Problem 532. Return unique values without sorting
If the input vector A is [42 1 1],
the output value B must be the unique values [42 1]
The values of B are in the same order as A
Solution Stats
Problem Comments
- 
		3 Comments
		@bmtran (Bryant Tran)
    	on 27 Mar 2012
	
	
  	perhaps you should specify that y is in the order of the first occurence of each unique element of x
		Peter Wittenberg
    	on 6 Oct 2012
	
	
  	This would be a better problem if unique and sort functions were not allowed
		Jihye Sofia Seo
    	on 10 Feb 2017
	
	
  	Nice problem!
Solution Comments
Show commentsProblem Recent Solvers981
Suggested Problems
- 
         
         1969 Solvers 
- 
         Create a cell array out of a struct 2258 Solvers 
- 
         All your base are belong to us 561 Solvers 
- 
         Back to basics 9 - Indexed References 451 Solvers 
- 
         
         593 Solvers 
More from this Author30
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!