how to check which line of code is in execution in matlab?
51 ビュー (過去 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.
0 件のコメント
回答 (3 件)
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.
0 件のコメント
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.
1 件のコメント
Walter Roberson
2016 年 12 月 26 日
Note: the pause button is fairly new, no earlier than R2016a (might have been R2016b)
julims
2017 年 11 月 23 日
hi, with profiler and profile_history you can get the executed lines in each function and functions executed.
1 件のコメント
Walter Roberson
2017 年 11 月 24 日
True, but that does not tell you which line is currently executing.
参考
カテゴリ
Help Center および File Exchange で Image Processing Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!