How to find fft for part of my output? I mean after removing the initial transient of my data, I need for only x(4000:5000).
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
x and t are vectors of 0:0.1:5000;
n = length(x);
dt = t(end)/(n-1);
Fs=1/dt ;
NFFT = n ;
y=fft(x,NFFT) ;
f=(Fs/2)*linspace(0,1,NFFT/2 +1)*2*pi;
figure(1)
subplot(2,1,1)
plot(t(4000:5000),x(4000:5000))
figure(1)
subplot(2,1,2)
plot(f,y(1:NFFT/2 +1));
figure(3)
plot(abs(f),abs(y(1:NFFT/2+1)));
Pow = abs(y(1:NFFT/2 +1)).^2;
Pow(1) = 0;
figure(4)
plot(f,Pow)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Performance finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!