De-dupe - MATLAB Cody - MATLAB Central

Problem 76. De-dupe

Difficulty:Rate

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

64.04% Correct | 35.96% Incorrect
Last Solution submitted on Apr 11, 2025

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers3426

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page