hello, I want to detect different number in matrix?
for exmaple in a matrix:
0 0 0 0 0 0 0; 3 3 0 0 0 0 0; 3 3 3 0 0 0 0;0 0 0 0 4 4 4; 0 0 5 5 0 0 0;5 5 5 5 5 0 0;
How can I know the number of different values in this matrix, and index for any elements with same value?
Can I use function 'diff'?
Best Answer