Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: Two curves fitting with two equations

$
0
0
"Chong " <wingser719@gmail.com> wrote in message <k6jibg$hd1$1@newscl01ah.mathworks.com>...
> Dear all,
>
> I want to fit two curves with two equations which share several parameters. For example,
> y1(x) = a1*f1(x)+b1*f2(x);
> y2(x) = a1*f1(x)+b2*f2(x).
>
> Does anyone know how to do this kind of fitting?
>
> Thanks in advance.

This is a non linear least squares problem. lscurvefit, lsqnonlin or nlinfit in the optimization and stats toolboxes will do the job.

I assume you have data for 'x' and are measuring y1 and y2 as responses. For most of these functions setting up y (and x for that matter) as vectors will be the way to go.
 
Check out the documentation for the optimization tool box or curve fitting toolbox.

Viewing all articles
Browse latest Browse all 19628

Trending Articles