Lecture 20: Trigonometric interpolations - PowerPoint PPT Presentation

About This Presentation
Title:

Lecture 20: Trigonometric interpolations

Description:

t=t0 (tn-t0)*(0:n-1)/n; % n evenly-spaced time points ... Example of Gibb's phenomenon - failure of trig interpolation for nonperiodic functions ... – PowerPoint PPT presentation

Number of Views:91
Avg rating:3.0/5.0
Slides: 8
Provided by: p94
Learn more at: https://math.unm.edu
Category:

less

Transcript and Presenter's Notes

Title: Lecture 20: Trigonometric interpolations


1
Lecture 20 Trigonometric interpolations
Download triginterp.m
Calculate trig interpolation at interval t0,
tn In p points based on interpolation in n points
2
t0-10 tn10 n50 pn10 tt0(tn-t0)(0n-1
)/n n evenly-spaced time
points tpt0(tn-t0)(0p-1)/p p
evenly-spaced time points f
inline('exp(-t.2)') test function to
interpolate xf(t) xexactf(tp) yfft(x)
apply DFT ypzeros(p,1)
yp will hold coefficients for
ifft yp(1n/21)y(1n/21) move n
frequencies from n to p yp(p-n/22p)y(n/22n)
same for upper tier xpreal(ifft(yp))(p/n)
invert fft to recover data errorxp-xexact' su
bplot(2,1,1) plot(t,x,'o',tp,xp) plot
data points and interpolant title('trigonometric
nterpolation') subplot(2,1,2) plot(tp,error,'o'
) plot error title('error')
3
(No Transcript)
4
Gibbs phenomenon
Example of Gibb's phenomenon - failure of trig
interpolation for nonperiodic functions t00 tn1
0 n50 pn10 tt0(tn-t0)(0n-1)/n
n evenly-spaced time points tpt0(tn-t0)(0p-1)/
p p evenly-spaced time points f
inline('exp(-t.2)') test function to
interpolate xf(t) xexactf(tp) yfft(x)
apply DFT ypzeros(p,1)
yp will hold coefficients for
ifft yp(1n/21)y(1n/21) move n
frequencies from n to p yp(p-n/22p)y(n/22n)
same for upper tier xpreal(ifft(yp))(p/n)
invert fft to recover data errorxp-xexact' su
bplot(2,1,1) plot(t,x,'o',tp,xp) plot
data points and interpolant title('trigonometric
nterpolation') subplot(2,1,2) plot(tp,error,'o'
) plot error title('error')
5
Download triginterpgibbs.m
6
(No Transcript)
7
Inclass
Interpolate function exp(-x4) at interval
-10,10 from 50 equally spaced points. Plot your
result.
Write a Comment
User Comments (0)
About PowerShow.com