P16_5 - xx = (-1:0.01:1);...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function P16_5 f x = [-1 -0.6 -0.2 0.2 0.6 1]; x y = [0 0 0 1 1 1]; y xx = (-1:0.01:1); x yy = spline(x,y,xx); y %plot(x,y,'o',xx,yy) % %---------------------------------------------------------------------- % cs = spline(x,[0 y 0]);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: xx = (-1:0.01:1); %plot(x,y,'o',xx,ppval(cs,xx),'-'); %----------------------------------------------------------------------% xx = (-1:0.01:1); x yy = interp1(x, y, xx, 'cubic')...
View Full Document

Ask a homework question - tutors are online