say I have a matrix with positive and negative numbers,e.g A= [-1 ; -2 ; 6 ; -4 ; 5 ; 10; -22; 4];
How do I create a new matrix with only the positive/negative numbers of the matrix above? e.g A_neg=[-1;-2;-4;-22];
I know that with the find command I can find in which row/column these are, but I am not sure how to create another one.
Thanks in advance!