Hello! I am working on ECG signal classification. During pre processing stage. I need to segment my signal into 2 sec duration length (2000 samples, frequency 1000 hertz). The problem is I have to do this for multiple signals (whole dataset is consisting of 1000 signals) and save them to use for further processing. I am not getting how to apply loop to get this task done.
for one signal I am using these approaches.
vb = buffer((sig, numel(sig/5)))
nn = length(qrs_amp);
beat = zeros(length(qrs_amp) - 1, 651);
where sig = original signal
ecg_h= filtered signal
qrs_amp= R-peak value