Lecture 19: Clamped cubic splines. - PowerPoint PPT Presentation

About This Presentation
Title:

Lecture 19: Clamped cubic splines.

Description:

If we add 2 extra points to y compare with. x, then we will get clamped spline with first y(1) ... plot(x,y,'o',xx,yy,xx,yyexact,'r') legend('Interpolating ... – PowerPoint PPT presentation

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

less

Transcript and Presenter's Notes

Title: Lecture 19: Clamped cubic splines.


1
Lecture 19 Clamped cubic splines.
Download splineclamp.m
Function spline(x,y,xinterp) If we add 2 extra
points to y compare with x, then we will get
clamped spline with first y(1) defining
derivative at x(1) and y(n) defining derivative
at x(n)
2
x 110 y cos(x) xx 10.210 yy
spline(x,0 y 0, xx) yyexactcos(xx) plot(x,y,'
o',xx,yy,xx,yyexact,'r') legend('Interpolating
points','Spline','Exact')
3
now use correct values of derivatives at end
points x 110 y cos(x) xx
10.210 y1-sin(1) yn-sin(10) yy
spline(x,y1 y yn, xx) yyexactcos(xx) plot(x,y
,'o',xx,yy,xx,yyexact,'r') legend('Interpolating
points','Spline','Exact')
4
Inclass
Interpolate function exp(x) at interval 2,7
from 10 equally spaced points between 2,7. Use
MATLAB function Spline with not-a-knot end
conditions. Plot your result.
Write a Comment
User Comments (0)
About PowerShow.com