read = matfile('ECG.mat'); [cor, lags] = xcorr(read.ecg, read.ecg); read.Fs;
So i have
read.ecg (signal) and
read.Fs. How can i find/count beats/minute in matlab?
Here is plot
I would suggest processing the ECG signal through a standard QRS detection algorithm (e.g. Pan-Tompkins). Once you have isolated the QRS complexes in your ECG signal, you can simply count them, divide by the duration of your ECG signal, and convert to beats/min. Here is one implementation of Pan-Tompkins: https://www.mathworks.com/matlabcentral/fileexchange/45840-complete-pan-tompkins-implementation-ecg-qrs-detector. I am sure you can find others on physionet.