?? q605.m
字號(hào):
%《MATLAB在電子信息課程中的應(yīng)用》第六章例6.5程序q605
% 求任意線性系統(tǒng)的沖擊函數(shù)和卷積
% 電子工業(yè)出版社出版 陳懷琛 吳大正 高西全合著 2001年10月
clf,clear
a=input('多項(xiàng)式分母系數(shù)向量a=(書上取 [1,2,8] ) ');
b=input('多項(xiàng)式分子系數(shù)向量b=(書上取 1 ) ');
t=input('輸入時(shí)間序列t=[0:dt:tf](書上取 [0:0.1:5]) ');
u=input('輸入序列u=(書上取 3*t+cos(0.1*t)) ');
tf=t(end);dt=tf/(length(t)-1);
[r,p,k] = residue( b, a); %用極點(diǎn)留數(shù)法求沖擊函數(shù)
h = r(1)*exp(p(1)*t)+r(2)*exp(p(2)*t); % 沖擊函數(shù)h(t)
subplot(2,1,1),plot(t,h);grid
x=conv(u,h)*dt; % 求u和h的卷積
subplot(2,1,2),plot(t,x(1:length(t)));grid
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -