MATLAB正弦问题
MATLAB sinc issue
我正在尝试使用下面的代码在下图中绘制 sinc 函数,但没有得到它。有什么建议吗?
X = -5:1/150:5;
Y = 2*150e6*pi*sinc(150e6*X);
试试这个:
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('\pi B \mathrm{sinc}(Bt)$','interpreter','latex')
我正在尝试使用下面的代码在下图中绘制 sinc 函数,但没有得到它。有什么建议吗?
X = -5:1/150:5;
Y = 2*150e6*pi*sinc(150e6*X);
试试这个:
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('\pi B \mathrm{sinc}(Bt)$','interpreter','latex')