Find a series of consecutive numbers in a vector
Show older comments
Hello, I have a small problem I am trying to solve on Matlab, but....
I have a vector containing timestamps: [1 2 3 6 7 9 10 50 60]
For the consecutive numbers, I only need the first one,so in my example, the answer will be [1 6 9 50 60]
Right now I cannot find a simple way to get that result.
If anyone can help, it would be greatly appreciated.
Thank you!
Accepted Answer
More Answers (0)
Categories
Find more on Mathematics 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!