使用matlab 编写的基本幅度调制的代码
%基本幅度调制
dt=0.01;
T=5;
N=T/dt;
t=[0:N-1]*dt;
fmax=1;
fc=10;
A=2;
mt=cos(2*pi*fmax*t);
s_am=(A+mt).*cos(2*pi*fc*t);
% 输出图像
figure(1);
subplot(211);
plot(t,mt);
hold on;%保持上一副图像不变
plot(t,s_am);
hold on;
plot(t,A+mt,'r--');%标出已经调制信号的包络
hold on;
%plot(t,A+mt,'b--');