Excel Vs Matlab Curve Fitting Tool

조회 수: 4 (최근 30일)
Mahesh Karki
Mahesh Karki 2019년 5월 7일
댓글: Mahesh Karki 2019년 5월 7일
Hello to everyone whoever is reading this post,
I am using a curve fitting tool for bunch of data points and used 1 degree polynomial to test the equation and coefficients that which i also did in excel. The coefficients seem to be differ, I don't understand why, am i missing something here?
Result from the Excel :
Results from Matlab:
As you see the coefficient seems to be differ so much.
As for a tets example :
x variable 1 : 5
x Variable 2 : 10
Looking for = 0.28+5*0.041-10*0.0038 = 0.447 (From Excel)
Looking for = 0.7639+5*0.1439-10*0.001785 = 1.46 ( From Matlab) which is far off then Excel
Thanks
Karki

채택된 답변

dpb
dpb 2019년 5월 7일
Read the output from Matlab -- the model has been standardized whereas the Excel model uses raw data. Note the R-sq and adjusted R-sq values are the same -- they both fit the same model identically.
  댓글 수: 2
Steven Lord
Steven Lord 2019년 5월 7일
To be more explicit:
x = 5;
y = 10;
normalizedX = (x-13.75)./3.431;
normalizedY = (y-24.26)./4.631;
f = 0.7639 + 0.1439*normalizedX - 0.01785*normalizedY
That's in pretty close agreement to the value you received from Microsoft Excel. If you evaluate the fit with your x and y as shown in the "Evaluate the Fit at a Specific Point" section on this documentation page it will use the full double precision values of the normalization factors and the coefficients. The result of that direct evaluation of the fit should agree even more closely with Excel than the indirect evaluation using the rounded normalization factors and coefficients.
Mahesh Karki
Mahesh Karki 2019년 5월 7일
Thank you Steven for your clear answer. Appreciated so much. :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by