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).

조회 수: 3 (최근 30일)
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개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by