finding the lines of code that are being printed to command line

조회 수: 14 (최근 30일)
A Poyser
A Poyser 2023년 3월 17일
댓글: Stephen23 2023년 3월 17일
I have a repository of code that works very well, but I am in the process of refactoring it.
One of the problems is that it is printing to the command window. I have fouind lots of lines without semi colons, including all of the backup files, that I have added semi colons to. The problem is it is still printing from somewhere in the repository.
Is there a way of scouring the repository at a high level to find where all of these abset semi-colons may be (not) hiding?
Thanks

채택된 답변

Sachin
Sachin 2023년 3월 17일
I understand that you want to identify the line of code that prints the associated value in the command window.
MATLAB editor already identifies these lines for you. For this, you must use a Code Analyzer.
Assignments without a semi-colon are marked in the editor using a warning. The appropriate lines are also indicated on the RHS of the editor by the scrollbar
Refer to the following page for how to use the Code Analyzer in the MATLAB editor.
Thanks
Sachin
  댓글 수: 1
A Poyser
A Poyser 2023년 3월 17일
Thanks so much for your response.
I have already used this and found what I thought to be all of the missing semi-colons. However, I still get print statements in the command window. I was hoping there might be a way to dig through the entire repository without opening each individual function.
Thanks
Alex

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by