フィルターのクリア

lsqcurvefit constrain to real fitting parameters

10 ビュー (過去 30 日間)
Rosalie
Rosalie 2012 年 5 月 15 日
Hi,
I'm trying to fit my data using the 'lsqcurvefit' command. However this returns me imaginairy fitting parameters, which I don't want. Is there any way to constrain the fitting parameters to real numbers?
The function I'm trying to fit is the following:
function F = eWLC(pp,y)
F = pp(2)*(1-1/2*sqrt(((4.1)./(y-pp(4))./pp(1)))+(y-pp(4))./pp(3));
thanks,
Rosalie

回答 (1 件)

Adam Parry
Adam Parry 2012 年 6 月 28 日
I'm sorry that I don't have an answer but I am also suffering from the same problem.
Did you come up with a fix, or was it to do with the equation itself?
  1 件のコメント
Star Strider
Star Strider 2012 年 6 月 28 日
編集済み: Star Strider 2012 年 6 月 28 日
From a quick look, it would seem that constraining
pp(4) < y
might keep everything real, but without knowing more I can't be sure.
What are the parameter value estimates that 'lsqcurvefit' returns? Are the complex parameter estimates conjugates? How well does the resulting function fit the data?

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

カテゴリ

Help Center および File ExchangeLeast Squares についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by