How can i write this constrain in cvx

norm([x(i+1)-x(i),y(i+1)-y(i)]) <= Dmax

I think you can eliminate the for loop and make this a little faster by using norms as in your previous question (x-x0).^2+(y-y0).^2 .