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 .
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 .