Matlab: How to profile inefficient lines of code with running count visualisation?

조회 수: 6 (최근 30일)
I need to find lines that are executed most. For example, Eclipse has a plugin at least for Java that shows the line counts. Does this kind of plugin or tool exist with Matlab?
P.s. I asked the same question in SO: I don't know yet which place is better for Matlab-style questions -- anyway I will close one when other solved and then redirect -- sorry about cross-posting but this is important thing in profiling.

채택된 답변

David Barry
David Barry 2013년 5월 20일
No it's there in 2012a but just hidden away. You will be able to use the commands in the link above.
  댓글 수: 2
Henri
Henri 2013년 5월 20일
편집: Henri 2013년 5월 20일
I was able to find p=profile('info');p.FunctionTable.ExecutedLines but I cannot find a way to visualise the data-dump, it is pretty hard reading.
Henri
Henri 2013년 5월 22일
편집: Henri 2013년 5월 22일
I was able to profile the inefficient lines by clicking the blue hyperlinks in the Profile Summary. This was solved by the SO thread mentioned. Anyway thank you for your help!

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

추가 답변 (1개)

David Barry
David Barry 2013년 5월 20일
You should lookup the MATLAB Profiler. This is easily accessible through the toolbar in 2012b onwards (run and time is one way).
  댓글 수: 1
Henri
Henri 2013년 5월 20일
편집: Henri 2013년 5월 20일
Thanks, I got the 2012B now running but I cannot yet find a way to generate the linewise analysis. I did all small working examples there but not seeing any colours.

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

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by