blob: cd5e0032ee0dfc3e7024da7ece34d8c5d9f22143 (
plain)
1
2
3
4
5
6
7
8
9
|
// example 5.2
// evaluate fp(.8) and fpp(.8) with quadratic interpolation;
xL=[.4 .6 .8];
f=[.0256 .1296 .4096];
h=.2;
fp=(1/2*h)*(f(1)-4*f(2)+3*f(3))
fpp=(1/h^2)*(f(1)-2*f(2)+f(3)) // from equation 5.22c and 5.24c in the book;
|