How does one perform a fast Fourier transform (fft) on heart rate variability data?

4 ビュー (過去 30 日間)
Samuel
Samuel 2012 年 9 月 12 日
Having obtained the RR intervals over a 30 min range at sampling rate of 1000 per second.

回答 (1 件)

Muthu Annamalai
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)|')

カテゴリ

Help Center および File ExchangeFourier Analysis and Filtering についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by