How to use not equal in for loop
14 ビュー (過去 30 日間)
古いコメントを表示
Is it possiable to use ~= in for loop like
for t ~= 1
xxx
xxx
xxx
end
0 件のコメント
回答 (1 件)
James Tursa
2020 年 8 月 10 日
編集済み: James Tursa
2020 年 8 月 10 日
You could use a while loop. E.g.,
t = 0;
while( t ~= 1 )
% code
% at some point, either set t=1 or break out of loop
end
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!