How does one perform a fast Fourier transform (fft) on heart rate variability data?
4 ビュー (過去 30 日間)
古いコメントを表示
Having obtained the RR intervals over a 30 min range at sampling rate of 1000 per second.
0 件のコメント
回答 (1 件)
Muthu Annamalai
2012 年 9 月 20 日
編集済み: Muthu Annamalai
2012 年 9 月 20 日
Hello Samuel, We can only calculate the Discrete Fourier Transform, as an approximation of the actual continuous Fourier Transform, using the FFT algorithm; all this means is that DFT is same as FFT.
You want to read MATLAB FFT algorithm implementation, doc at www.mathworks.com/help/matlab/ref/fft.html?nocookie=true, and adapt example section with your parameters;
My preliminary attempt follows.
HTH, -Muthu
Fs = 1000; % Sampling frequency = 1kHz
T = 1/Fs; % Sample time
L = 30*60; % Length of signal (s)
t = (0:L-1)*T; % Time vector
y = ; %replace with your signal
NFFT = 2^(ceil(log2(length(y)))); %infimum power of 2 w.r.t length
%NFFT ~= 2048; %closest to 1800 for example
Y = fft(y,NFFT)/L;
f = Fs/2*linspace(0,1,NFFT/2+1);
% Plot single-sided amplitude spectrum.
plot(f,2*abs(Y(1:NFFT/2+1)))
title('Single-Sided Amplitude Spectrum of y(t)')
xlabel('Frequency (Hz)')
ylabel('|Y(f)|')
0 件のコメント
参考
カテゴリ
Help Center および 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!