Degree of polynomial surface fitting (cftool - fit)

6 ビュー (過去 30 日間)
Simone Nordera
Simone Nordera 2020 年 9 月 1 日
回答済み: Rishabh Mishra 2020 年 9 月 4 日
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 Center および File ExchangeInterpolation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by