Re: fitting simultaneously multiple data set



John D'Errico wrote:
>
>
> In article <ef1eb3a.-1@xxxxxxxxxxxxxxxx>,
> "peter normile" <peter_normile@xxxxxxxxxxx> wrote:
>
>> I have two data sets which I want to fit to the same functional
> form,
>> with certain parameters the same for both fits, and others
> differing.
>> e.g.,
>>
>> data set 1, y1(x1)
>> data set 2, y2(x2)
>>
>> fit to y1 is f1(x1,p1), p1 is parameter vector
>> fit to y2 is f2(x2,p2), p2 is parameter vector
>>
>> p1 = [p1(1) p1(2) p1(3) p1(4) p1(5)]
>> p2 = [p2(1) p2(2) p2(3) p2(4) p2(5)]
>>
>> and p2(2) = p1(2), p2(3) = p1(3)
>>
>> Total of number of parameters to fit = 8
>>
>> Can anyone point in the right direction?
>
>
> No problem. Merge the two into one larger least
> squares problem, with some parameters used for
> both problems and some parameters only needed for
> one of the segments.
>
> HTH,
> John D'Errico
>
>
> --
> The best material model of a cat is another, or preferably the
> same, cat.
> A. Rosenblueth, Philosophy of Science, 1945
>
> Those who can't laugh at themselves leave the job to others.
> Anonymous
>
Many thanks, this worked!
peter
.



Relevant Pages

  • Re: n-dimensional interpolation
    ... My idea is to first interpolate the non-uniform raw data to a ... 'grid' then to smooth the data and finally fit to the model. ... "John E'Errico". ... The best material model of a cat is another, ...
    (comp.soft-sys.matlab)
  • Re: fitting simultaneously multiple data set
    ... > I have two data sets which I want to fit to the same functional form, ... > data set 1, y1 ... The best material model of a cat is another, or preferably the same, cat. ...
    (comp.soft-sys.matlab)
  • Re: error using fmincon
    ... Can you fit this model? ... HTH, ... John D'Errico ... The best material model of a cat is another, or preferably the same, cat. ...
    (comp.soft-sys.matlab)
  • Re: help with sliding window algorithm!
    ... > Hi John, ... > Can polyfit return the R^2 value of its fit? ... Given vectors x and y that go into polyfit, ... The best material model of a cat is another, or preferably the same, cat. ...
    (comp.soft-sys.matlab)
  • Re: Surface Fitting
    ... John D'Errico wrote: ... >> Is it possible to fit a function to a 3D surface in MATLAB? ... > preferably the same, cat. ...
    (comp.soft-sys.matlab)