读书破万卷 下笔如有神
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); impul(sys,t); title('Impul Resp on '); xlabel('Time(c)'); ylabel('Amplitude');
subplot(2,2,4); x_delta=zeros(size(t)); x_delta(t==O)=1OO; [y1,t]=lsim(sys,x_delta,t); y2=y1;
plot(t,y2); title('Impul Resp on '); xlabel('Time(c)'); ylabel('Amplitude');
1 「 L
自行车写生o.5ed 0.5 ued tiulptilmpOm A°A- 0.5-0.51050 0510Time(c) Time(c) (c)品尝
读书破万卷 下笔如有神
腊梅作文3-2
函数inti如下:
fun ctio n [F,tF]=i nt1(f,tf,a)
带数字成语T=tf(2)-tf(1);
最不值钱的货币F=zeros(size(tf));
tF=zeros(size(tf));
tF=tf;
for n=1:le ngth(tf)-1;
F(n+1)=F( n)+T*f( n);
end
验证如下:
t=[-1:0.01:4];
e=zeros(size(t));
e=(t>-1/2&t<1);
[z,zz]=i nt1(e,t,-1);
figure;
plot(zz,z);
读书破万卷 下笔如有神
4-1
T1=1;
N1=10000;
t1=li nspace(0,T1-T1/N1,N1)';
f1=1-2*t1;
OMG=32*pi;
K1=100;
omg=li nspace(-OMG/2,OMG/2-OMG/K1,K1)';
X1= T1/N1*exp(-j*kro n(omg,t1.'))*f1;
fs1=OMG/2/pi/K1*exp(j*kro n( t1,omg.'))*X1;
T2=5;
N2=10000;
t2=li nspace(0,T2-T2/N2,N2)';
fs2=0*t2;
f2=sawtooth(t2*2*pi,0);
X2=T2/N2*exp(-j*kro n(omg,t2.'))*f2;
fs2=fs2+OMG/2/pi/K1*exp(j*kro n(t2,omg.'))*X2;
figure;
subplot(2,2,1);
plot(omg,abs(X1),'r');
xlabel('Freque ncy'),ylabel('Amplitude')
ti tle(' 单个锯齿周期幅频特性曲线 橡木板');
subplot(2,2,2);
plot(t1,fs1,'r');
xlabel('Time'),ylabel('Amplitude')
title('Fu ncti on after recovered');
subplot(2,2,3);
plot(omg,abs(X2),'r');
xlabel('Freque ncy'),ylabel('Amplitude')
ti tle(' 五个锯齿周期幅频特性曲线 ');
subplot(2,2,4);
plot(t2,fs2,'r');
xlabel('Time'),ylabel('Fu ncti on after recovered')
title('Fu ncti on after recovered');
读书破万卷 下笔如有神
纪念册