lsqcurvefit for several data sets at once
이전 댓글 표시
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
Adam Danz
2019년 3월 11일
lsqcurvefit() is a function. Why don't you just loop through each of your data sets?
Fabian Hartmann
2019년 3월 11일
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
2019년 3월 11일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
