Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if

 a = [5 3 6 4 7 7 3 5 9]

then

 dedupe(a) = [5 3 6 4 7 9]

Solution Stats

6430 Solutions

3821 Solvers

Last Solution submitted on Feb 09, 2026

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...

Group


Problem Recent Solvers3821

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!