?? shiyuyunsuan2.m
字號:
%信號的時域運算 程序名: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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -