psk_beike.m
来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 31 行
M
31 行
close all,clear;
t=-4.1:0.01:4.1;
c1=cos(4*pi*t);
c2=cos(4*pi*t+pi);
x=u(t+4)-u(t+1)+u(t-1)-u(t-4);%cos(0.2*pi*t);
L=length(t);
for i=1:L;
if x(i)==1
s(i)=c1(i);
else s(i)=c2(i);
end
end
%s=x.*c1+x.*c2.*(u(t+1)-u(t-1));%(x+A0).*c;
subplot(221)
plot(t,x)
title('The modulating signal x(t)')
axis([-4.1,4.1,-0.1,1.1]),
grid on
%subplot(222)
%plot(t,c1)
%title('The carrier c(t)')
%axis([-10,10,-2,2]),
%grid on
subplot(223)
plot(t,s),hold on,plot(t,x,'r:');
title('The modulated signal s(t)')
axis([-4.1,4.1,-1.1,1.1])
grid on
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?