フィルターのクリア

LSQCURVEFIT Global Fit Unequal Data Question

1 回表示 (過去 30 日間)
Kelly McGuire
Kelly McGuire 2017 年 8 月 3 日
コメント済み: Torsten 2017 年 8 月 7 日
Ok, so I am trying to do a global fit of multiple traces to obtain 4 parameters. I have 15 traces that I am trying to fit at the same time using LSQCURVEFIT. Everything works fine if the data in my matrix has an equal number of columns in each of the rows. But, here is the problem. For 6 of the 15 traces, I collected more data. Now, yes I could just delete some of that data so that the number of columns is equal in each row, but my professor wanted more data for the global fit for those 6 traces intentionally. I won't go into detail as to why more data was required for those 6 traces. My question though is how can I do this fit using LSQCURVEFIT if the number of columns for these 6 traces is greater in those 6 rows than the other 9 rows? I'll get errors like index exceeds matrix dimensions (even if the other columns from the other 9 rows is filled with NaN). How can I do this fit with unequal columns in some of my data rows? I read that using cell arrays might work, but I couldn't figure out how with this kind of fit.
  6 件のコメント
Kelly McGuire
Kelly McGuire 2017 年 8 月 4 日
John D'Errico, could you elaborate on your first sentence, "You don't need to have the same number of points on each curve to make lsqcurvefit work."?
Torsten
Torsten 2017 年 8 月 7 日
Use "lsqnonlin" instead of "lsqcurvefit".
Then you don't need to use "xdata" and "ydata" as direct input for the solver and you can define them as cell arrays.
Best wishes
Torsten.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Curve Fitting Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by