Curve Fitting (polynomial fitting and interpolation)
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Matt J
il 5 Lug 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.
Risposte (1)
Matt J
il 5 Lug 2019
Modificato: Matt J
il 5 Lug 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 Commenti
Vedere anche
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!