can anyone help in this looping which has 408 number of elements in array but the last one 408th one is not executed...
古いコメントを表示
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..
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!