MATLAB: How to get the y value of xx of spline function

spline

Official example:
x = -4:4; y = [0 .15 1.12 2.36 2.36 1.46 .49 .06 0];
cs = spline(x,[0 y 0]);
xx = linspace(-4,4,101);
plot(x,y,'o',xx,ppval(cs,xx),'-');
I want to get the 101 y values corresponding to xx.
Thanks

Best Answer

y = ppval(cs,xx);