Searching on a vector of vector
Show older comments
Hi,
I have a question about searching on a vector of vector. Each element of the first vector is a vector of value. The elements of the outer vector can be duplicated. I have to find a new representation in which there are no duplicates. How can I do it in efficient way?
Example
X=[0,1,0;0,1,1;0,1,0] -> Xnew=[0,1,0;0,1,1] where the first element has value two and the second one.
Thank
1 Comment
Answers (1)
Andrei Bobrov
on 14 Nov 2012
Xnew = unique(X,'rows');
Categories
Find more on Operators and Elementary Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!