
信号与系统_MATLAB_实验_课后习题答案汇编.docx
5页信号与系统_MATLAB_实验_课后习题答案 第三章练习题 1、 a=[1,1,1]; b=[1,1]; sys=tf(b,a); t=[0:0.01:10]; figure; subplot(2,2,1); step(sys); subplot(2,2,2); x_step=zeros(size(t)); x_step(t>0)=1; x_step(t==0)=1/2; lsim(sys,x_step,t); subplot(2,2,3); impulse(sys,t); title('Impulse Response'); xlabel('Time(sec)'); ylabel('Amplitude'); subplot(2,2,4); x_delta=zeros(size(t)); x_delta(t==0)=100; [y1,t]=lsim(sys,x_delta,t); y2=y1; plot(t,y2); title('Impulse Response'); xlabel('Time(sec)'); ylabel('Amplitude'); 00.5 11.5 Step Response Time (sec)A m p l i t u d e Linear Simulation Results Time (sec) A m p l i t u d e -0.50 0.5 1 Impulse Response Time(sec) (sec) A m p l i t u d e Impulse Response Time(sec) A m p l i t u d e 2、 函数int1如下: function [F,tF]=int1(f,tf,a) T=tf(2)-tf(1); F=zeros(size(tf)); tF=zeros(size(tf)); tF=tf; for n=1:length(tf)-1; F(n+1)=F(n)+T*f(n); end 验证如下: t=[-1:0.01:4]; e=zeros(size(t)); e=(t>-1/2&t0 S=0;break; End; End; 稳定系统: Sys=tf(1,[1,2]); S=isstable(sys); S= 1 不稳定系统: Sys=tf(1,[1,-2]); S=isstable(sys); S= 第七章练习题 1、 a=[1,0.5,-0.2,-0.1]; b=[1,-0.3]; n=[0:10]'; [hi,t]=impz(b,a,n); subplot(1,2,1); stem(n,hi); u=(n>=0); hn=filter(b,a,u); subplot(1,2,2); stem(n,hn); 2、 n1=[0:9]'; n2=[10:19]'; x1=(n1>=0); x2=-(n2>=10); a1=[1,-0.2,-0.1]; a2=[1,-0.2,0.5]; b=[1,0.01]; [y1,wf1]=filter(b,a1,x1,[0,1]); [y2,wf2]=filter(b,a2,x2,wf1); stem(n1,y1); hold on; stem(n2,y2); 。
