Piecewise Cubic Hermite Interpolating Polynomial (PCHIP)
7 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello friends
I am doing cubic interpolation for the data x = [5.8808 6.5137 7.1828 7.8953]; y = [31.2472 33.9977 36.7661 39.3567];
pp = pchip(x,y);
Now pp gives coefficients of the polynomials but why they are not satisfying the data points, I am not able to understand, why is it happening like that?
If anyone knows about it, please let me know
Thanks
Bhomik
0 Commenti
Risposta accettata
Richard Brown
il 14 Giu 2013
It works perfectly
x = [5.8808 6.5137 7.1828 7.8953];
y = [31.2472 33.9977 36.7661 39.3567];
pp = pchip(x,y);
You could draw a picture
xs = linspace(5, 8, 200);
ys = ppval(pp, xs);
plot(xs, ys, 'b-', x, y, 'ro')
Or test the function values
ppval(pp, x) - y
Where's the problem?
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Polynomials in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!