A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 -1.0000 0.0500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.5000 -0.0000 0.0500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.0000 1.0000 0.0500 1.0000 1.0000 0.0500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.0000 1.0000 0.0500 -1.0000 1.0000 0.0500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.5000 -0.0000 0.0500 -1.5000 -0.0000 0.0500 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1.0000 -1.0000 0.0500 -1.0000 -1.0000 0.0500B=unique(A,'rows')B-1.5000 -0.0000 0.0500 -1.5000 -0.0000 0.0500 -1.0000 -1.0000 0.0500 -1.0000 1.0000 0.0500 0 0 0 1.0000 -1.0000 0.0500 1.0000 1.0000 0.0500 1.5000 -0.0000 0.0500
MATLAB: I have 98×3 matrix with only 7 unique rows of values which are output of some simulation. How to extract that? I tried Unique function but am not getting unique rows. Below is the original matrix A and matrix after using unique function B.
matrix manipulationunique
Best Answer