フィルターのクリア

What is wrong with MATLAB asin() function.

5 ビュー (過去 30 日間)
Muhammad Usman
Muhammad Usman 2022 年 4 月 4 日
回答済み: Voss 2022 年 4 月 4 日
I am trying to use asin in a matlab simulink model but it aslways showing this error : Domain error. To compute complex results from real x, use 'asin(complex(x))'. But when i am debugging the error i found that it is computing asin(0.5)=1.0142e-311. how this is happening in matlab.

採用された回答

Voss
Voss 2022 年 4 月 4 日
Since both screen shots have the debugger stopped on line 5, it would appear that the value of ux is up to date but that thetad has not yet been calculated for that ux (since line 5 has not been executed for that ux).
Indeed asin(0.5) gives a different value than the thetad shown:
asin(0.5)
ans = 0.5236

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Environment Customization についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by