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

조회 수: 47 (최근 30일)
aditya kumar sahu
aditya kumar sahu 2016년 12월 24일
댓글: Walter Roberson 2017년 11월 24일
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.
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 12월 26일
Note: the pause button is fairly new, no earlier than R2016a (might have been R2016b)

댓글을 달려면 로그인하십시오.


julims
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
Walter Roberson 2017년 11월 24일
True, but that does not tell you which line is currently executing.

댓글을 달려면 로그인하십시오.

카테고리

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