How can I interpolate data using quartic or higher order polynomials? Similar to the cubic spline interpolator csapi?
Afficher commentaires plus anciens
How can I interpolate data using quartic or higher order polynomials? Similar to the cubic spline interpolator yy=csapi(x,y,xx) ?
4 commentaires
Abdul Mannan
le 8 Sep 2015
Exactly same problem. Please, someone answer this question. I shall be very thankful to you. I need this for smooth 2nd derivative.
Abdul Mannan
le 8 Sep 2015
Modifié(e) : Abdul Mannan
le 8 Sep 2015
I just got the answer and here it is.
clc
clear
close all
x = [0,0.125,0.25,0.375,0.5,0.625,0.75,0.875,1];
y = [0,0.7071,1,0.7071,0,-0.7071,-1,-0.7071,0];
k = 5; % quintic spline as you desire
sp = spapi( optknt(x,k), x, y );
xx = 0:.005:1; % desired sampling
yy = fnval(xx,sp);
plot (xx,yy) %
Good Luck
farid anjum
le 26 Sep 2017
Thanks bro.. I got finally what i was trying to do myself since days and couldn't.
Utkarsh Deshmukh
le 14 Déc 2017
can you show the interpolant function used?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


