Borrar filtros
Borrar filtros

How can I run a code in the command window multiple times?

2 visualizaciones (últimos 30 días)
Mariam Chatha
Mariam Chatha el 28 de Sept. de 2015
Respondida: Walter Roberson el 28 de Sept. de 2015
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 28 de Sept. de 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

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by