Let us consider non causal function, we can use built in function as follows :
Fs=42;Ts=1/Fs;
t=-1:Ts:40*Ts-Ts;
f=5;
y=sinc(pi*t*f);
figure;
plot(t,y);
xlabel('x');
ylabel(' magnitude');
N=512;
fy=(fft(y,N));
figure;
fr=(0:N-1)*Fs/N;
plot(fr,fftshift(abs(fy)));
xlabel(' frequency x^{-1}');
ylabel(' magnitude');
The width of range is approximately pi*f=15.70.
the second part requires ifft function.
2 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/210082-hi-all-i-need-to-plot-a-fast-fourier-transform-fft-of-a-sinc-function#comment_279422
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/210082-hi-all-i-need-to-plot-a-fast-fourier-transform-fft-of-a-sinc-function#comment_279422
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/210082-hi-all-i-need-to-plot-a-fast-fourier-transform-fft-of-a-sinc-function#comment_279428
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/210082-hi-all-i-need-to-plot-a-fast-fourier-transform-fft-of-a-sinc-function#comment_279428
サインインしてコメントする。