Respiration rate calculation by using photoplethysmogram
Show older comments
Hi. Anyone know the calculation for respiration rate? I used this formula but it seems like for heart beat.
dataset = xlsread('rrest-syn192_data.xlsx','Sheet1','A1:B30000')
s = dataset(:,1)
%y = dataset(:,2)
data = [s];
N1 = length(s)
t=0:1/500 : N1/500-1/500
plot(t,s)
title('Plot of signal')
xlabel('Time')
ylabel('Sample(s)')
[pks,locs,w,p] = findpeaks(data)
a=size(pks)
peak_count = (a/2)
Duration_s = (N1/500)
Duration_m = (Duration_s/60)
total_rate_per_minute = (peak_count/Duration_m)
1 Comment
Star Strider
on 29 Oct 2019
Answers (0)
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!