Fit and Polyfit (LAR vs. Least squares)

조회 수: 33 (최근 30일)
sks
sks 2013년 7월 4일
I am trying to better understand the difference between fit and polyfit. Am I right to think that fit for polynomials still uses the least absolute residual robust (LAR) method rather than the least squares method (polyfit)?

채택된 답변

Guru
Guru 2013년 7월 4일
You can find out by asking for the output argument:
[fitobject,gof,output] = fit(x,y,fitType)
output.algorithm
But the real difference between fit and polyfit are the options that you can choose as well as polyfit is strictly limited to polynomials and uses the least squares method.
  댓글 수: 1
sks
sks 2013년 7월 4일
Thank you for the quick answer.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by