how to do repeating numbers in array
Show older comments
Hi
I have an array like [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0].
I want output like, [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].
how i can do this?
Thanks in Advance!!!
Murugan
Accepted Answer
More Answers (1)
Categories
Find more on Logical 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!