is 'continue' in 'c' language similar in MATLAB??
1 回表示 (過去 30 日間)
古いコメントを表示
i am changing my code of c language in to matlab .but its gives infinite loop in Matlab during use 'continue' statement?
what is the problem? is there any other alternate of 'continue' statement?
4 件のコメント
採用された回答
Friedrich
2013 年 4 月 6 日
編集済み: Friedrich
2013 年 4 月 6 日
Hi,
yes continue in MATLAB is the same as in C. However when I look at that while loop:
while j<=n
if j==i
continue;
end
this can`t even work in C. If j == i you will hit an endless loop because j never changes. Maybe you are missing to increment j before the continue statement?
2 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!