Avoid a cycle using lsqcurvefit (or lsqnonlin)

2 ビュー (過去 30 日間)
Kerim Khemraev
Kerim Khemraev 2016 年 9 月 25 日
コメント済み: Star Strider 2016 年 9 月 25 日
Hi everybody,
I have many curves of experimental data (n*1000) and I need to apply lsqcurvefit function to determine the coefficients of equations. As a result I expect two coefficients to each of my curve. So indeed I can use lsqcurvefit in a cycle to each of my curve. But if there is a way to apply this function without cycle?
Best regards

回答 (1 件)

Star Strider
Star Strider 2016 年 9 月 25 日
You would have to do your regressions iteratively in a loop.
I would ask lsqcurvefit for all the outputs, and then store them in a cell array (in a separate assignment line) in the event you find it necessary to calculate confidence intervals on the parameters or the fit, or otherwise compare the individual regressions from a statistical perspective.
  4 件のコメント
Star Strider
Star Strider 2016 年 9 月 25 日
It depends what your problem is.
I have no idea what it is, so I cannot provide a more exact solution.



Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by