keep just positive or just negetive answer of acos?
14 ビュー (過去 30 日間)
古いコメントを表示
I have arccos and I want to keep just negative answer of it? how can I do it?(there are two answer)
0 件のコメント
採用された回答
jonas
2018 年 8 月 12 日
If A is a vector with your answers. Remove non-negatives by
A(A>=0)=[]
2 件のコメント
jonas
2018 年 8 月 13 日
編集済み: jonas
2018 年 8 月 13 日
I don't understand. What function did you use? The fact that you want to keep only one value implies that you have two, hence my simple fix.
MATLAB's acos however only returns a single positive solution. If you want a negative solution, just multiply by -1, as cos(x)=cos(-x)
"For real elements of x in the interval [-1,1], acos(x) returns real values in the interval [0,pi]." - the doc
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!