Least Squares Method- Νon linear to Linear

조회 수: 2 (최근 30일)
E
E 2013년 2월 9일
Hello! I need to approach some given points [X,Y]with the use of the method of the least squares.Also,for the approximation of these points we have the function f=ax/(b+x).My problem is that I can't bring the function to the standard form f=aX+b.Does anyone know what should I do? Thank you in advance!

채택된 답변

Shashank Prasanna
Shashank Prasanna 2013년 2월 9일
You are talking about two different things here.
f=aX+b
is linear regression which can be solved by either \ or the regress function.
f=ax/(b+x)
as you noted is non-linear, you can use nlinfit in the statistics toolbox or set up your own optimization routine using fminsearch by setting up a least squares to solve it.
The following link should help you in this venture:
That said of course you can fit your data using the first linear model, but depending on your data this may not be the right model, but its this or that, its your choice of model for your data.

추가 답변 (1개)

Bill Whiten
Bill Whiten 2013년 2월 9일
You can write the equation as f=(a/b)x-(1/b)fx and use linear regression for the coefficients (a/b) and (1/b). Convert these to a and b as initial estimates for fminsearch or non linear least squares functions.
  댓글 수: 1
Greg Heath
Greg Heath 2013년 2월 9일
Your equation makes no sense to me at all. How was it derived?

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

카테고리

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