How to convert from a for loop to a while loop
2 ビュー (過去 30 日間)
古いコメントを表示
i got stuck how to change this code from for loop to a while loop ,may someone help![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288419/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/288419/image.png)
4 件のコメント
Geoff Hayes
2020 年 4 月 29 日
abood - which for loop do you want to convert to a while loop? All three?
回答 (1 件)
Eva-Maria Weiss
2020 年 4 月 30 日
編集済み: Eva-Maria Weiss
2020 年 4 月 30 日
j = 1
while j <= 59
COPOALL(j,1) = COPOALL(j,1) + AllstudentsResult(j+3,i);
j = j + 1;
end
Maybe something like that? The same for the other for loops....
But why to replace? :)
Good luck!!!
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!