How do I plot a phase plot for FFT and code time history for down-sampled signal?
Show older comments
Hello,
Thus far, i have completed this code which gave me a frequency vs amplitude graph. I'm ussure how to get a phase graph from this or time history of down sampled signal by a given rate etc I nwould be grateful for assistance for this.
data = [0 0.829668000000000
0.00833300000000000 0.829801000000000
0.0166670000000000 0.828810000000000
0.0250000000000000 0.829008000000000
0.0333330000000000 0.828352000000000
0.0416670000000000 0.827073000000000
0.0500000000000000 0.826807000000000
0.0583330000000000 0.826828000000000
0.0666670000000000 0.826857000000000
0.0750000000000000 0.827056000000000
0.0833330000000000 0.827139000000000
0.0916670000000000 0.828689000000000]
t = data(:,1);
s = data(:,2);
Ts= 0.0083;
Fs=1/Ts;
Fn= Fs/2;
L=4000;
smean=mean(s);
Fts=fft(s-smean)/L;
Fv= linspace(0,1,fix(L/2)+1)*Fn;
Iv=1:numel(Fv);
figure
plot(Fv,abs(Fts(Iv))*2)
grid
xlabel('frequency')
ylabel('Amplitude')
Accepted Answer
More Answers (0)
Categories
Find more on Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!