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.

-498.5<br />

-499<br />

-499.5<br />

-500<br />

-500.5<br />

-501<br />

5<br />

0<br />

-5<br />

-5<br />

图 4.11-2<br />

(2)<br />

xi=linspace(-5,5,50);yi=linspace(-5,5,50);[XI,YI]=meshgrid(xi,yi);<br />

ZI=interp2(X,Y,Z,XI,YI,'*cubic');<br />

surf(XI,YI,ZI),view(-25,25)<br />

4.12 样条函数及其应用<br />

4.12.1 样条插值<br />

图 4.11-3<br />

− t<br />

【例 4.12.1-1】根据连续时间函数 w(<br />

t)<br />

= e 的采样数据,利用 spline 重构该连续函数,并<br />

检查重构误差。<br />

t=-5:0.5:5;w=exp(-abs(t));<br />

N0=length(t);tt=linspace(t(1),t(end),10*N0);<br />

ww=spline(t,w,tt);<br />

error=max(abs(ww-exp(-abs(tt))))<br />

plot(tt,ww,'b');hold on<br />

stem(t,w,'filled','r');hold off<br />

error =<br />

0.0840<br />

27<br />

0<br />

5

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

Saved successfully!

Ooh no, something went wrong!