Curve Fitting (polynomial fitting and interpolation)
14 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I am working on surface fitting of data. I am using "fit" function to perform polynomial fitting and interpolation for surface fitting. It is very sucessfull and i have no problem with it.
I have also used "griddata" for linear interpolation. This method is also very sucessfull.
While using "griddata", when i need to find the unknown z(z_req) from known x(x_req) and y(y_req), i use the below piece of code to do it :
x_req=0.8668;
y_req=0.1114;
z_req= griddata(xnew,ynew,znew,x_req,y_req,'linear');
it gives me the value for z , it is working fine.
Now i need to find the unknown z by using "fit" function, and i was not yet able to do it like i did with "griddata".
Is there any method to find the unknown z with the help of "fit" function in surface fitting?
1 commentaire
Matt J
le 5 Juil 2019
I am using "fit" function to perform polynomial fitting and interpolation for surface fitting.
Your terminology is confusing. Curve fitting and interpolation are different things.
Réponses (1)
Matt J
le 5 Juil 2019
Modifié(e) : Matt J
le 5 Juil 2019
fit() will return a fitobject, which you can use to evaluate the surface at any point you wish
zq=fitobject(xq,yq)
It's important to understand that zq is is the value of the fitted surface at the point [xq,yq]. It is not an interpolated value, because the surface may not pass through the points you used to perform the fit.
0 commentaires
Voir également
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!