i got this error in this code i don't know why.
c=[x(1:end-1,:),x(2:end,:)]; dx=c(:,2)-c(:,1); t=[y(1:end-1,:),y(2:end,:)]; dy=t(:,2)-t(:,1); ra=[]; rb=[]; for i=1:size(dx) if dx(2i-1)>0 & dy(2i)<0; ra(2i-1)=1; ra(2i)=1; end if dy(2i-1)>0 & dx(2i)<0; rb(2i-1)=1; rb(2i)=1; end end
Best Answer