What is difference between fit and fitlm function in MATLAB?

13 ビュー (過去 30 日間)
Meghraj Kc
Meghraj Kc 2022 年 6 月 21 日
回答済み: Sam Chak 2022 年 6 月 22 日
I am trying to fit the data between two variable i.e., x and y. For fitting the data I am using fit and fitlm function.Upto the polynomial order 2 (poly2) I am geeting the same coefficient value from both function but while using the higher order polynomial greater than 2 I am geeting NaN value from fitlm function and some value from fit function. What is the reason behind this?
I have attached the screenshot of difference between two function and also the excel sheet that includes my data.

回答 (1 件)

Sam Chak
Sam Chak 2022 年 6 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by