For example A=[ 5 3 2 5 1 3 1 1 2 2; 5 8 6 6 1 4 4 2 3 3; 7 9 9 7 4 8 10 6 4 7; 8 10 10 9 9 8 10 6 5 7] In first column 5 duplicate and in five column 1 duplicate I want replace one of duplicated values with 0 i tried this but not give correct answer diffrent=find(diff(A(1:4,:))==0); A(diffrent)=zeros(size(diffrent));
MATLAB: How Detect duplicate value in each column and replace one value with zero
duplicate value column
Related Question
- Help running Matlab script
- Is it possible to extract the values with a vector of indices for each row without using the for statement from the matrix
- How to compress and delete the same values in vector
- How to modify a matrix to change the entries >=0 and multiply it by 5 AND to change the entries <0 and add 2 to those entries
- How to find a subset matrix in the main matrix and build a new matrix
Best Answer