how to check which line of code is in execution in matlab?

51 vues (au cours des 30 derniers jours)
aditya kumar sahu
aditya kumar sahu le 24 Déc 2016
Commenté : Walter Roberson le 24 Nov 2017
i have 1000 lines of program. is there any command or how can i know which line of code or loop is currently in execution.

Réponses (3)

Jan
Jan le 26 Déc 2016
Either use echo or the debugger. Some disp statements at the relevant lines (the ones, which consume the most time) would be helpful also.

Image Analyst
Image Analyst le 26 Déc 2016
Another option, other than echo, is to hit the pause button, though that will just stop on the currently executing line, whereas echo will stream all the lines of code to the command window as they are executing.
  1 commentaire
Walter Roberson
Walter Roberson le 26 Déc 2016
Note: the pause button is fairly new, no earlier than R2016a (might have been R2016b)

Connectez-vous pour commenter.


julims
julims le 23 Nov 2017
hi, with profiler and profile_history you can get the executed lines in each function and functions executed.
  1 commentaire
Walter Roberson
Walter Roberson le 24 Nov 2017
True, but that does not tell you which line is currently executing.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by