MATLAB: Resetting a Time vector to zero

vector

suppose I have the following time vector
x = [ 4 5 6 7 8 9 10 ]
I want it reset the vector to zero so I could use:
stepsize = x(2)-x(1)
newx = [ 0:stepsize:length(x)-1]
output:
0 1 2 3 4 5 6
Is there a faster way or more efficient way to do this in matlab?

Best Answer

newx=x-x(1)