loops - Value comparison of matrix elements in MATLAB -
say have 256 256 matrix. replace values 'greater' or 'equal' 10 1 , make rest 0 i.e. (values < 10).
for example,
2 3 6 15 24 32 1 7 39 10 .... 1 5 7 11 19 10 20 28 9 ........ 10 24 6 29 10 25 32 10 .......... ................................. .................................
and want output be:
0 0 0 1 1 1 0 0 1 1 ............ 0 0 0 1 1 1 1 1 0 .............. 1 1 0 1 1 1 1 1 ................ ................................ ................................
how can it?
example:
a = [3 2 6 6 ; 7 5 3 7 ; 7 10 8 9 ; 2 4 3 10]; b = ( > 5 ) b = 0 0 1 1 1 0 0 1 1 1 1 1 0 0 0 1
Comments
Post a Comment