How to find average heart beat using fast Fourier transform function
์ด์ ๋๊ธ ํ์
Hi,
I am trying to use the fft function to compute the power spectrum of an ECG.
ecg=load ('ecg.csv');
A=fft(ecg);
L=length(ecg);
X_mag=abs(A);
X_phase=angle(A);
fs=350/2;
Fbins=((0: 1/L: 1-1/L)*fs).';
E=(X_mag).^2;
figure
plot (Fbins, E)
So far I have done this to create a plot using the data. How do I change the frequency axis to BPM?
Also where and how do I find the average heart rate from this data?
Any help would be much appreciated as I am new to matlab and struggling.
Maybe I should add that to obtain the power spectrum, i need to compute the following equation:
? = |FFT(???)|^2
๋๊ธ ์: 3
dpb
2020๋
1์ 9์ผ
What units is fs?
Anon
2020๋
1์ 9์ผ
Star Strider
2020๋
1์ 9์ผ
์ฑํ๋ ๋ต๋ณ
์ถ๊ฐ ๋ต๋ณ (0๊ฐ)
์นดํ ๊ณ ๋ฆฌ
๋์๋ง ์ผํฐ ๋ฐ File Exchange์์ Fourier Analysis and Filtering์ ๋ํด ์์ธํ ์์๋ณด๊ธฐ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
