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

3 visualizaciones (últimos 30 días)
Having obtained the RR intervals over a 30 min range at sampling rate of 1000 per second.

Respuestas (1)

Muthu Annamalai
Muthu Annamalai el 20 de Sept. de 2012
Editada: Muthu Annamalai el 20 de Sept. de 2012
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)|')

Categorías

Más información sobre Fourier Analysis and Filtering en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by