MATLAB sinc问题

时间:2015-04-12 22:17:59

标签: matlab signal-processing

我试图使用下面的代码在下面的图片中绘制sinc函数,但没有得到它。有什么建议吗?

enter image description here

X = -5:1/150:5;
Y = 2*150e6*pi*sinc(150e6*X);

1 个答案:

答案 0 :(得分:2)

试试这个:

hold all
c = 3e8; %// speed of light, m/s
x = -5:1/150:5;
t = x/c;
for B = [150e6 300e6 600e6]; %// bandwidth, Hz
    y = 2*pi*B*sinc(B*t);
    plot(x,y)
end
grid
legend('B = 150 MHz', 'B = 300 MHz', 'B = 600 MHz')
xlabel('$x = ct$','interpreter','latex')
ylabel('$2\pi B \mathrm{sinc}(Bt)$','interpreter','latex')

enter image description here

相关问题