keep just positive or just negetive answer of acos?
조회 수: 15 (최근 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개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Manage Products에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!