MATLAB: Keep just positive or just negetive answer of acos

acos

I have arccos and I want to keep just negative answer of it? how can I do it?(there are two answer)

Best Answer

If A is a vector with your answers. Remove non-negatives by
A(A>=0)=[]