To delete repeated data in Matlab, you can use the unique function as follows:
38 chars3 lines
Output:
36 chars3 lines
This will remove all the repeated values in the array A and output the unique values in array B. You can also use the 'rows' parameter of the unique function to remove repeated rows of a matrix.
50 chars3 lines
Output:
42 chars4 lines
This will remove all the repeated rows in matrix A and output the unique rows in matrix B.
gistlibby LogSnag