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

47 次查看(过去 30 天)
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.

回答(3 个)

Jan
Jan 2016-12-26
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 2016-12-26
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.

julims
julims 2017-11-23
hi, with profiler and profile_history you can get the executed lines in each function and functions executed.

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by