06.08.2013 Views

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

内容简介作者简介 - 科学与工程计算系

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

−t<br />

− t / 2<br />

【例 4.8.3.5-2】求函数 u(<br />

t)<br />

= e U ( t)<br />

和 h ( t ) = te U ( t ) 的卷积。本例展示:(A)<br />

符号 Laplace 变换求卷积的理论表示;(B)SIMULINK 卷积法的执行过程和它的快速精确<br />

性。(C)从理论符号解产生相应的理论数值序列。<br />

(1)<br />

syms tao;t=sym('t','positive');<br />

US1=laplace(exp(-t));<br />

HS1=laplace(t*exp(-t/2))<br />

yt1=simple(ilaplace(US1*HS1))<br />

HS1 =<br />

1/(1/2+s)^2<br />

yt1 =<br />

4*exp(-t)+(2*t-4)*exp(-1/2*t)<br />

(2)<br />

(3)<br />

t=yt2(:,1);<br />

yyt1=eval(vectorize(char(yt1)));<br />

[dy,kd]=max(abs(yyt1-yt2(:,2)));<br />

dy12=dy/abs(yyt1(kd))<br />

dy12 =<br />

2.8978e-006<br />

图 4.8-3<br />

−t<br />

−t<br />

/ 2<br />

【例 4.8.3.5-3】用“零阶”近似法求 u(<br />

t)<br />

= e U ( t)<br />

和 h(<br />

t)<br />

= te U ( t)<br />

的卷积。本例演示:<br />

(A)连续函数的有限长度采样。(B)卷积数值计算三个误差(“截尾”误差、“零阶”<br />

近似误差、计算机字长误差)的影响。(C)卷积“无截尾误差”区间、“非平凡”区间端<br />

点的确定。(D)离散卷积和连续卷积之间的关系。(E)指令 conv 的使用。(F)绘图分<br />

格线的运用。<br />

(1)<br />

(2)<br />

%<br />

t2=3;t4=11;T=0.01;<br />

tu=0:T:t2;N2=length(tu);<br />

th=0:T:t4;N4=length(th);<br />

u=exp(-tu);h=th.*exp(-th/2);<br />

tx=0:T:(t2+t4);Nx=length(tx);<br />

yt3=T*conv(u,h);<br />

%<br />

t=tx;yyt1=eval(vectorize(char(yt1)));<br />

[dy,kd]=max(abs(yyt1(1:N2)-yt3(1:N2)));<br />

dy13(1)=dy/abs(yyt1(kd));<br />

[dy,kd]=max(abs(yyt1(N2+1:N4)-yt3(N2+1:N4)));<br />

dy13(2)=dy/abs(yyt1(N2+kd));<br />

[dy,kd]=max(abs(yyt1(N4+1:Nx)-yt3(N4+1:Nx)));<br />

dy13(3)=dy/abs(yyt1(N4+kd));<br />

(3)<br />

disp('与理论结果的相对误差')<br />

disp([blanks(4),'[0,3]段 [3,11]段 [11,14]段']),disp(dy13)<br />

plot(t,yyt1,':b',tx,yt3,'r')<br />

17

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!