How to show the time history of a signal down-sampled under the rates of 25Hz & 40Hz and find its DFT analysis using Matlab ? The sample signal is in a data file (sensor_data.mat) its sampling rate is 1000Hz.
I can get the time history and the DFT analysis of the signal.
Fs = 1000; % sampling rate
T=1/Fs; % sample time
L= 20000; % lenght of signal
t=(0:L-1)*T; % time vector
figure(1)
plot(t,u)
grid;
title('Time History of the Signal')
% dft analysis
yf=fft(u);
w=[0:2*pi/L:(L-1)*2*pi/L];
figure(2)
plot(w/(2*pi*T),abs(yf))
grid
title('DFT analysis of the signal sampled at 1000Hz')
But how do I down-sample it ? I know Matlab has a function for it (downsample), but I'm not getting any correct answers.
Also how do I find the signals frequency range and amplitude over its frequency range from the DFT analysis ?
Thanks in advance, Please help !!
fftshift
. 2. Explain why you think your results are incorrect -- what did you expect, and what did you get. $\endgroup$x
is sampled at 1000 Hz, theny=downsample(x,10)
is sampled at 1000/10=100 Hz. $\endgroup$