필터 지우기
필터 지우기

Is it possible to remove statements/lines from the command window (not everything)?

조회 수: 13 (최근 30일)
Is it possible to remove statements/lines from the command window (not everything)? I just want to clean up the window before taking a screenshot for an assignment submission, but I don't want to have to re-enter all the stuff I want to keep if I were to clear everything. Thank you for your assistance.

채택된 답변

Image Analyst
Image Analyst 2023년 1월 25일
You can type clc to clear the window. Then you can type up arrow to execute only the commands you want to show in the window.
Alternatively you can use something like Photoshop to paint over stuff in the command window screenshot that you do not want to show.
  댓글 수: 10
Jeremy
Jeremy 2023년 1월 25일
Thanks, again, Walter.
I have actually used that method, and it does work.
I was hoping that there was a built in feature of MATLAB, though, to make it more convenient and am going to suggest it to MathWorks.
I appreciate the help.
Steven Lord
Steven Lord 2023년 1월 25일
Rather than pressing up and executing each individual command one at a time you can select a subset of the commands in the Command History (using Ctrl if the commands you want to execute are not contiguous in the History or Shift if they are), right-click on the selected subset, and choose "Evaluate Selection".
The context menu will also allow you to create a script or live script with the selected commands if you want to turn the results of interactive experimenting into something you could publish, turn into a function to be reused with different inputs, etc.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by