Info
此问题已关闭。 请重新打开它进行编辑或回答。
For Loop. My goal is for my code to recognize if the user inputs an empty 'grade' and then to loop back into itself until the user enters 10 grade values individually.
1 次查看(过去 30 天)
显示 更早的评论
9 个评论
回答(1 个)
Rik
2020-10-15
I would suggest using a cell array initially, which you can convert to a normal array after the loop. That way you can use the isempty function to check for an empty input.
Since you don't know how often you need to retry, I would suggest a while loop.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!