Reputation: 2094
I've a matrix
A = [0.125680 0.543107 0.40088]
If a number in that matrix is greater or equal .5 I want to replace it with 1.
If a number is less than .5 I want to replace it with 0.
So my final matrix will be B = [0 1 0]
. How will I do that without for
loop?
Upvotes: 0
Views: 188