Perhaps a rather simple question, but the suggested questions seem to all be covering something slightly different. What I have can be described as follows.
One takes a dataset, call it Data
; it has dimensions 10 by 1000 by 2 lets say, which is to say it is 10 arrays of {x,y} data of length 1000.
Now I know the following about it: it behaves according to a model Model[x,a,b,c]
. Moreover, all 10 arrays have the same a,b
but not the same c
parameter. What I am interested in is how one does a NonLinearModelFit
over such a dataset, fitting a,b,c1...c10
in a single go. I should note that I have an initial value array cinit
of dimensions 10 as well.
One way I thought of that should in principle work is with KroneckerDelta
; I could prepend each dataset with some coordinate that I could use in addition to x and then make a model with the deltafunctions, but this feels very sloppy. There should be an easy way, should there not?
I would post the full model and the data I am working with, but not only is it a big dataset, the parameters and the model are still very much undetermined. I think it would make the question rather offtopic as it is my job to figure out the parameters, not you. So I thought it would make sense to just stick to the concept.