lsqcurvefit for several data sets at once
Afficher commentaires plus anciens
Hello,
I would like to generate a function using lsqcurvefit. I do have a few data sets from several experiments. Every experiment has different parameters and one variable. Now I would like to generate a function with lsqcurvefit. But I want this function to be optimised for all data sets at once. Is there a way to do this? Or should I use another tool for that?
For example my data looks like this:
% Experiment 1
a1 = 0.416;
b1 = 2;
c1 = 2;
x1 = [0 0.33 0.67 1 1.33 2];
y1 = [1 0.89 0.8 0.44 0.62 0.37];
% Experiment 2
a2 = 0.801;
b2 = 0.67;
c2 = 4;
x2 = [0 0.17 0.33 0.5 0.67];
y2 = [1 0.8 0.84 0.83 0.81];
% and so on...
Thanks for your answers!
4 commentaires
Adam Danz
le 11 Mar 2019
lsqcurvefit() is a function. Why don't you just loop through each of your data sets?
Fabian Hartmann
le 11 Mar 2019
So you'd like to combine the data across experiments and fit it is one large data set? You mentioned that data from each experiment has different parameters which would potentially weaken the goodness of fit and/or variance of the data. Maybe I don't understand still. What would your inputs look like?
Fabian Hartmann
le 11 Mar 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
