?? feiyinguojuanji.m
字號:
%本程序用來計(jì)算兩個(gè)因果連續(xù)信號之間的卷積 程序名:yinguojuanji
%要求參與卷積運(yùn)算的兩個(gè)信號滿足當(dāng)t<0時(shí),其值等于0。
clear
t0=input('請輸入信號的起始時(shí)間:');
t1=input('請輸入信號的終止時(shí)間:');
p=.001;
t=t0:p:t1;
b=input('請輸入沖激信號的位移:');
x=s(t+b);
h=input('請輸入系統(tǒng)沖激響應(yīng)例如exp(-2*t).*u(t):');
f=conv(x,h);
subplot(3,1,1)
plot(t,x)
grid on
subplot(3,1,2)
l=length(x);
for i=1:l;
a1(i)=p*f(i);
end
plot(t,h)
grid on
subplot(3,1,3)
subs(a1,t,t+5);
plot(t,a1)
grid on
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -