How can I run a code in the command window multiple times?
2 次查看(过去 30 天)
显示 更早的评论
I need to run my code in the command window in MATLAB multiple times to get an accurate result. I would like to know how to do that.
0 个评论
回答(1 个)
Walter Roberson
2015-9-28
Type in the command multiple times? Type in the command once, and after that press the up-arrow and Return to get it to repeat the previous command? Write a "for" loop in the command window, such as
for K = 1 : 10; YourCommandHere; 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!