MATLAB: Calculating BPM – from PPG signal

arduinobpmheart rateppg

Hi everyone,
I've been able to create a script that reads heart rate – displaying the value in real time on a graph.
Now i need to calculate the number of peaks in the graph and work out the BPM
Any simple script solution?
Any help will be most appreciated! Thanks!

Best Answer

Check out the findpeaks command. Alternatively (if you do not have access to the Signal Processing Toolbox) you could do a Fourier Transform and look at the dominant frequency components.