|
"Marc" wrote in message <jvgke4$s3o$1@newscl01ah.mathworks.com>...
> "Lars" wrote in message <jvgja1$n68$1@newscl01ah.mathworks.com>...
> > Hi,
> > I am really a rookie in both data analysis as well as Matlab optimization toolbox.
> > In order to adopt measured data to model which want to use in Simulink I have to run a nonlinear regression analysis.
> > The function model is like this:
> > y(x,T)=1.2+(a(1)+a(2)*T)/0.02*x+a(3)*log10((a(4)+a(5)/T+a(6)/T.^2)/0.02*x+1)
> > So the function is dependent on x and T.
> > You can also say that a(1) and a(2) are a function of T (=a(1)+a(2)*T).
> > The same is true for a(4), a(5) and a(6) (=a(4)+a(5)/T+a(6)/T^2).
> >
> > So, is it possible to feed the lsqcurvefit with "two" x variables?
> >
> > Cheers,
>
> I believe this is possible. See the example for nlinfit in the stats toolbox for 'hougen.m' example under nonlinear regression.
>
> nlinfit, lsqnonlin and lscurvefit all use similar solver engines so I typically find them interchangeable for the most part.
>
> In the example for hougen.m, one of the key points that I always screw up on is making sure your function spits out a column vector for f(x) where in your case x1 is x and x2 is T.
>
> Hope this helps
Well, yes! That solved this problem! Cheers!
|