suppose I have a Matrix like this:
A=[-3 -4 -5 -6 0 2 3 3 4 5 8 9 10]
Now I want to extract a Matrix whose positive value will be greater than 8 and all other +ve value less than 8 will be zero. And its -ve values will be less than -5 and all other -ve values will be zero. That means something like this:
A= [0 0 0 -6 0 0 0 0 0 0 0 9 10]
How to do that?
I have tried the below things
A(A<8)=0
it gives A=[ 0 0 0 0 0 0 0 0 0 0 8 9 10]
but my negative values are gone.
if i try
A(A>-5)=0
then I get;
A=[ 0 0 -5 -6 0 0 0 0 0 0 0 0 0]
But here all +ve values are gone. plz help..