フィルターのクリア

Simple function give complex number

4 ビュー (過去 30 日間)
boureghda mohammed
boureghda mohammed 2016 年 12 月 24 日
コメント済み: Star Strider 2016 年 12 月 24 日
Hi,
I have theses two function:
f1=-(x5 - x7^(1/a))/(T + T0)^2;
f2=(x8*(T*x5 + T0*x7^(1/a)))/(T0*x7*(T + T0)^2) - (x5*x8)/(T0*x7*(T + T0));
x5,x7,x8 are variables and a,T0,T are parameters.
When I run the code for a range of real values of variables and parameters, I always get a complex number for both functions, I do not know why this is happening.

採用された回答

Star Strider
Star Strider 2016 年 12 月 24 日
I suspect ‘x7’ is negative. If ‘a’ is not equal to 1, this will result in a complex result.
Example:
test = (-2)^(1/3)
test =
629.9605e-003 + 1.0911e+000i
  2 件のコメント
boureghda mohammed
boureghda mohammed 2016 年 12 月 24 日
thank you Star Strider.
Star Strider
Star Strider 2016 年 12 月 24 日
My pleasure.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by