Can you change the value of a variable while program is paused?

21 visualizaciones (últimos 30 días)
S
S el 8 de En. de 2022
Editada: the cyclist el 8 de En. de 2022
I have a program that iterates over 650 different data files. I meant to cap the time of each iteration to 50 seconds, but accidentally entered 500 seconds. The program has been running for a few hours now and I've only just realised. I was wondering if I could pause the progam and change the max time value to 50 seconds, or will I need to run all of the code again?

Respuestas (1)

the cyclist
the cyclist el 8 de En. de 2022
Editada: the cyclist el 8 de En. de 2022
Yes, you can.
I wasn't sure, but I just tested with the simple program
i=0;
while true
i = i+1
end
I was able to pause after some iterations, set i to a different value via the command line, and the while loop continued displaying i from the new input value.
I was not able to find any official documentation on this, though (after an admittedly brief search).

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by