error To compute complex results, make at least one input complex, e.g. 'power(complex(a),b)'.
1 回表示 (過去 30 日間)
古いコメントを表示
hi,
i try to run a function when i have:
b = -log(((F - G*1i)*(1 + (F^2 + G^2 - 1)^(1/2)*1i)*1i)/(F^2 + G^2))*1i;
but it's generated,
??? Domain error. To compute complex results, make at least one input complex, e.g.
'power(complex(a),b)'.
how can i resolve it?
4 件のコメント
Walter Roberson
2015 年 5 月 21 日
Somewhere along the line you sent me a sample F and G value (but not e1.) I explored the graph with those values, and used an arbitrary e1, and I found that your "b" value can come out real or complex depending on the exact values used. When G = 1 there is also a singularity.
回答 (2 件)
Walter Roberson
2015 年 5 月 20 日
Try
b = -log(((F - G*1i).*(1 + (F.^2 + G.^2 - 1).^(1/2)*1i)*1i)./(F.^2 + G.^2))*1i;
2 件のコメント
Walter Roberson
2015 年 5 月 20 日
I am going to speculate that what might work is
b = -log(((F - G*1i).*(1 + complex(F.^2 + G.^2 - 1).^(1/2)*1i)*1i)./(F.^2 + G.^2))*1i;
studentU
2015 年 5 月 20 日
編集済み: Walter Roberson
2015 年 5 月 21 日
1 件のコメント
Walter Roberson
2015 年 5 月 21 日
I am confused now. Is this in Simulink or is this at the MATLAB command prompt?
If it is at the MATLAB command prompt, then I need to a current copy of the line that failed and I need to know the values it fails on -- a sample el, F, G
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!