Degree of polynomial surface fitting (cftool - fit)

13 Ansichten (letzte 30 Tage)
Simone Nordera
Simone Nordera am 1 Sep. 2020
Beantwortet: Rishabh Mishra am 4 Sep. 2020
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!

Antworten (1)

Rishabh Mishra
Rishabh Mishra am 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.

Kategorien

Mehr zu Get Started with Curve Fitting Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by