P16_10 - % cs = spline(x,[0 y 0]); xx = (0:0.01:12);

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

View Full Document Right Arrow Icon
function P16_10 f x = [0 2 4 7 10 12]; x y = [20 20 12 7 6 6]; y xx = (0:0.01:12); x yy = spline(x, y, xx); y %plot(x,y, 'o', xx, yy) % yi = interp1(x,y, 1.5, 'spline') y %-----------------------------------------------------------------------
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % cs = spline(x,[0 y 0]); xx = (0:0.01:12); plot(x,y,'o',xx,ppval(cs,xx),'-'); yi2 = ppval(...
View Full Document

Ask a homework question - tutors are online