3.试使用函数fft(x)近似画出x(n) =R10(n)在(−4pi ,4pi )上的幅频响应曲线
(|FT[(X(n)]|)。
clc;
close all;
n=10;
subplot(2,1,1);
x=ones(1,n);
plot(x,'.');
xlabel('n');
ylabel('X(n)');
title('信号的原形');
hold on;
subplot(2,1,2);
dft_10=fft(x,16);
plot(abs(dft_10));
axis([-4 4 0 15]);
xlabel('w/pi');
ylabel('|Y(jw)|');
title('幅频响应曲线 N=16');
grid on;
这样对不对呀?
vBulletin® v3.8.3,版权所有 ©2000-2025,Jelsoft Enterprises Ltd.