Degree of polynomial surface fitting (cftool - fit)
6 views (last 30 days)
Show older comments
Good morning,
I need to fit a surface from a set of experimental points using a polynomial model. Curve fitting toolbox (cftool) allows to perform it and to obtain polynomial coefficients up to fifth degree for x and y. The fitted surface is not enough accurate and I would like to increase the polynomial degree.
How can I increase the polynomial degree of the surface?
Thank you!
0 Comments
Answers (1)
Rishabh Mishra
on 4 Sep 2020
Hi,
You can use the ‘polyfitn’ toolbox to serve your required purpose. The ‘polyfitn()’ function is able to accurately predict the coefficients of higher degree (degree > 5) polynomials given the ‘x’ & ‘y’ values.
The general syntax for the function is:
% define the degree of polynomial
deg = 8
fit = polyfitn(x,y,deg)
‘fit.Coefficients’ stores the coefficient values of the polynomial.
Hope This helps.
0 Comments
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!