I sampled a physiological signal every 20ms (50Hz) and I have a vector of 4000 bins. I want to know which is the spectrum of frequencies of this signal. There should be two main frequencies. The one with a deeper sliding should be respiratory frequency and the smaller one on the top of signal is the cardiac pulse artifact. I want to know what are the respective frequencies.
This is my code:
Fs = 50; % Sampling frequency
T = 1/Fs; % Sampling period
Lgp = length(godp); % godp is my physiological signal
tgp = (0:Lgp-1)*T; % Time vector
Ygp = fft(godp);
P2gp = abs(Ygp/Lgp);
P1gp = P2gp(1:Lgp/2+1);
P1gp(2:end-1) = 2*P1gp(2:end-1);
fgp = Fs*(0:(Lgp/2))/Lgp;
figure(1); hold on
plot(fgp,P1gp,'black'); hold on
title('Single-Sided Amplitude Spectrum of X(t)')
This is what I obtein:
Am I correct? Is the result I get reliable? It seems to me I obtein three peaks: 1) at zero, 2)at 0.46hz 3)0.88hz and maybe one another at 1.4hz.