for ii =2:n+1 if(nx(ii)-nx(ii-1)~=nx(ii+1)-nx(ii)||ny(ii)-ny(ii-1)~= ny(ii+1)-ny(ii)) flagarr(ii,1)= nx(ii); flagarr(ii,2)= ny(ii); flagarr(ii,3)=1; count=count+1; else normcount =normcount+1; flagarr(ii,1)=nx(ii); flagarr(ii,2)=ny(ii); flagarr(ii,3)=0; end
how to change so that i can execute from 1 to 408 if initialized with 1 then shows can't access nx(0) and if with n+1 at maximum gives nx(409) index out of bound…tried either but can't find..please requiring experts help…
thanks in advance..
Best Answer