multidimensional curve fitting y=mx+c

조회 수: 2 (최근 30일)
Vick
Vick 2017년 8월 24일
댓글: Samuel Vergara 2017년 8월 24일
Dear all, I can understand the problem of solving the equation y=mx+c where m and c are slope and offset in a scalar value, but how to solve the equation y=mx+c where m and c are slope and offset in a vector value. In the above problem both slope and offset are a kind of function of variables(A,B,C,D,E,F,etc), so have to change the variables to find the best m,c vectors which fits the curve y. C,E are all row vectors(not allowed to change) A,B,D,F- are scalar For example, m=A.*B.*C; c=D.*E; in this above function we have to optimize the variables A,B,D in order to get the best m and c row vectors which fits the curve.
requesting solution through With and without curve fitting toolbox if possible.
Thanks in advance.
  댓글 수: 3
Vick
Vick 2017년 8월 24일
편집: Vick 2017년 8월 24일
Sorry for the confusion A,B,D are all scalars
Only E,C,m and c are Vectors
Goal is to attain A,B,D values to get good fit.(C and E will not change)
y=Air flow measured at 2Hz for 1 hr
x=Pressure which changes during measurement(mbar), measured at 2Hz for 1 hr.
A,B,C,D,E are all correction which comes for pressure and other system The size will be more than 7200*1.
Note: My actual system has 17 variables(A,B,C,D,E,F,etc.,)
I'm now using Excel solver to solve which changes A,B and D value untill the error of calculated and measured 'y' is within 3% at all points.
Samuel Vergara
Samuel Vergara 2017년 8월 24일
Your problem is to find the parameters of a linear model, is just to solve y=O*X where O is a parameter matrix. Save your several training variables in columns in a Xt matrix, and solve: Y*pinv(X)=O. Check system identification in google.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by