Repeating numbers in array
In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0].
Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].
Solution Stats
Problem Comments
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers33
Suggested Problems
-
21460 Solvers
-
546 Solvers
-
Given a matrix, swap the 2nd & 3rd columns
1270 Solvers
-
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
400 Solvers
-
405 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Problem #2 has a missing right bracket on y_correct.
The test suite has been fixed.