MATLAB: Find a series of consecutive numbers in a vector

first number; consecutive sections

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!

Best Answer

v = [1 2 3 6 7 9 10 50 60];
x = v([true,diff(v)~=1]);