shiyuyunsuan2.m

来自「经典《信号与系统》教程的matlab例程,对深入理解信号与系统相关概念有很大帮助」· M 代码 · 共 37 行

M
37
字号
%信号的时域运算  程序名:shiyuyunsuan2
%本程序给出两个信号之间的乘法,并画出相应的波形图
%设两个信号分别为:f1(t)=sin(pi*t),f2(t)=sin(8*pi*t)
t=-10:.01:10;
w1=input('w1=');
f1=sin(w1*t);
subplot(2,2,1);
plot(t,f1);
axis([-5,5,-1.2,1.2]);
grid on;
title('f1=sin(w1*t)')

w2=input('w2=');
f2=sin(w2*t);
subplot(2,2,2);
plot(t,f2);
axis([-5,5,-1.2,1.2]);
grid on;
title('f2=sin(w2*t)')



f3=f1.*f2;
subplot(2,2,3);
plot(t,f3);
axis([-5,5,-1.2,1.2]);
grid on;
title('f3=f1*f2');


f4=f1+f2;
subplot(2,2,4);
plot(t,f4);
axis([-5,5,-1.2,1.2]);
grid on;
title('f3=f1+f2');

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?