Matlab 2018a fit function wrong coefficients

조회 수: 3 (최근 30일)
avihai
avihai 2021년 2월 6일
댓글: Star Strider 2021년 2월 9일
Hi,
I tried to use the fit function for a rational fitting (rat24) and I got very strange results although the fitted curve was similar to my function.
So I tried to use it with a known function: y=2t and did the fitting and the output again was wrong.
So in the following example I expected p1=0 and p2=2 and I get different results.
What am I doing wrong?
Thanks,
Avihai
  댓글 수: 1
James Tursa
James Tursa 2021년 2월 8일
Please post code as normal text highlighted by the CODE button. We can't copy & run images.

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

채택된 답변

Star Strider
Star Strider 2021년 2월 6일
The 'Normalize','on' name-value pair tells the function to centre and scale the data. This is appropriate for some situations where the independent variable does not begin at 0, and the dependent variable is much greater than 0. (To then plot it, that information must be included or the result will be significantly different from that expected.) Changing to 'Normalize','off', will produce the anticipated result for the parameter estimates.
  댓글 수: 9
avihai
avihai 2021년 2월 9일
It is awsome!!!
Star Strider
Star Strider 2021년 2월 9일
Thank you!

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

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by