Info
此问题已关闭。 请重新打开它进行编辑或回答。
how i can get loop?
2 次查看(过去 30 天)
显示 更早的评论
If the condition on line 33 acceptable, then return to the beginning of the program else will continue, I want a loop that its the output only lines 40-45, how i can to do it ... can i get example
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170657/image.png)
0 个评论
回答(2 个)
Image Analyst
2018-2-20
编辑:Image Analyst
2018-2-20
Put it inside a for or while loop. You can't get an example because I don't want to type in all your code and you didn't provide and text code that we can simply copy and paste. And that includes giving sample values for a, b, c, etc. so the code will run.
0 个评论
Walter Roberson
2018-2-20
In MATLAB, there is no direct way to "return to the beginning of the program". The closest you can get is things like
while true
...
if condition
do whatever
continue;
else
do whatever else
break;
end
end
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!