信号与系统matlab实践实验二,信号与系统matlab实验课后习题答案

41528d3028836879cd698677c3999917.gif信号与系统matlab实验课后习题答案

3-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 ); 0 5 10 0 0.5 1 1.5 Step Response Time (sec) Amplitude 0 5 10 0 0.5 1 1.5 Linear Simulation Results Time (sec) Amplitude 0 5 10 -0.5 0 0.5 1 Impulse Response Time(sec) (sec) Amplitude 0 5 10 -0.5 0 0.5 1 Impulse Response Time(sec) Amplitude3-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 [z,zz]=int1(e,t,-1); figure; plot(zz,z); -1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4 0 0.5 1 1.54-1 T1=1; N1=10000; t1=linspace(0,T1-T1/N1,N1) ; f1=1-2*t1; OMG=32*pi; K1=100; omg=linspace(-OMG/2,OMG/2-OMG/K1,K1) ; X1=T1/N1*exp(-j*kron(omg,t1. ))*f1; fs1=OMG/2/pi/K1*exp(j*kron(t1,omg. ))*X1; T2=5; N2=10000; t2=linspace(0,T2-T2/N2,N2) ; fs2=0*t2; f2=sawtooth(t2*2*pi,0); X2=T2/N2*exp(-j*kron(omg,t2. ))*f2; fs2=fs2+OMG/2/pi/K1*exp(j*kron(t2,omg. ))*X2; figure; subplot(2,2,1); plot(omg,abs(X1), r ); xlabel( Frequency ),ylabel( Amplitude ) title( 单个锯齿周期幅频特性曲线 ); subplot(2,2,2); plot(t1,fs1, r ); xlabel( Time ),ylabel( Amplitude ) title( Function after recovered ); subplot(2,2,3); plot(omg,abs(X2), r ); xlabel( Frequency ),ylabel( Amplitude ) title( 五个锯齿周期幅频特性曲线 ); subplot(2,2,4); plot(t2,fs2, r ); xlabel( Time ),ylabel( Function after recovered ) title( Function after recovered ); -100 -50 0 50 0 0.2 0.4 0.6 0.8 Frequency Amplitude 个 个 个 个 个 个 个 个 个 个 个 个 0 0.5 1 -1 -0.5 0 0.5 1 Time Amp

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值