📄 ask.m
字号:
echo on;
to=.15;
ts=.0005;
fc=200;
kf=50;
fs=1/ts;
t=[0:ts:to];
m=[5*ones(1,to/(3*ts)),-5*ones(1,to/(3*ts)),5*ones(1,to/(3*ts)+1)];
int_m(1)=0;
for i=1:length(t)-1
int_m(i+1)=int_m(i)+m(i)*ts;
echo off;
end
u=cos(2*pi*fc*t+2*pi*kf*int_m);
subplot(2,1,1);
plot(t,m(1:length(t)));
axis([0 .15 -5.1 6.1]);
xlabel('Time');
title('The massage signal');
subplot(2,1,2);
plot(t,u(1:length(t)));
axis([0 .15 -5.1 6.1]);
xlabel('time');
title('The modulated signal');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -