Borrar filtros
Borrar filtros

tic toc and debug mode

5 visualizaciones (últimos 30 días)
Mazen Azzam
Mazen Azzam el 17 de En. de 2018
Respondida: Walter Roberson el 17 de En. de 2018
I am measuring the time required to run a genetic algorithm for a certain optimization task. I'm not interested in measuring how the time varies with the size of the input, I only need the time required for a certain run to converge. Will pausing the script and entering debug mode would also pause the stopwatch (tic...toc); in other words, will the value returned by toc include the time spent in debugging mode? If so, is there any workaround to exclude debug time from the stopwatch?

Respuesta aceptada

Walter Roberson
Walter Roberson el 17 de En. de 2018
Yes, the time calculated by tic and toc keeps going during debugging. tic and toc are defined as elapsed time, and time still elapses during debugging. There is no work-around for this.
If you want to know only the time spent on computation then you should be considering using cputime()

Más respuestas (0)

Categorías

Más información sobre Genetic Algorithm 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