How can I run a code in the command window multiple times?
6 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Walter Roberson
on 28 Sep 2015
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 Comments
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!