Fitting two sets of data to one function simultaneously
Mostrar comentarios más antiguos
Hi
I have a question regarding fitting two sets of data to a non-linear function simultaneously. My real problem is much more complicated than this example, but if I understand how to do this, I can also do my real problem.
Assume that you have dataset 1: (x1,y1) dataset 2: (x2,y2)
I want to fit these data to a function F=mx+b. (a linear function, is not actually non-linear, my real problem is non-linear though). I also know that my two sets of data are common in "b" and are different in "m". , so the output of this simultaneous fitting, should be 3 parameters: m1,m2, b. I need to do a simultaneous for because I know that these two sets of data are actually related via than common parameter b.
I did a lot of research in MATLAB files on the web, some people suggest for simultaneous fits to non-linear functions, lsqfitcurve should be used. but I do not know how to define the function for a simultaneous fit. Function F should be a vector?
Thanks in advance for any help Nick
Respuesta aceptada
Más respuestas (1)
Nick M.
el 10 de Oct. de 2011
0 votos
Categorías
Más información sobre Linear and Nonlinear Regression en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!