how to stop executing while loop?
显示 更早的评论
x=1;
while x>0
x+1
end
2 个评论
KSSV
2020-10-28
This is an infinite loop...it will not stop....to force stop use ctrl + c .
Ramesh Singh
2020-10-28
采纳的回答
更多回答(1 个)
Alan Stevens
2020-10-28
Use a condition inside the while loop, such as
if x>10, break, end
类别
在 帮助中心 和 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!