Degree of polynomial surface fitting (cftool - fit)

6 次查看(过去 30 天)
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!

回答(1 个)

Rishabh Mishra
Rishabh Mishra 2020-9-4
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.

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by