How to open new command window?
조회 수: 35 (최근 30일)
이전 댓글 표시
I have some codes that I have saved in comand window and I want to create a new command window. So that I don't lose my code. Please help me.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1564804/image.png)
댓글 수: 1
Stephen23
2023년 12월 10일
"I have some codes that I have saved in comand window.."
The command window does not save any code. It does allow you to enter statements and see displayed results:
답변 (2개)
Matt J
2023년 12월 10일
편집: Matt J
2023년 12월 10일
You can launch a new Matlab session with its own command window, but the way you are going about saving work is very peculiar. Most people would save their work to a .m or a .mlx file
댓글 수: 3
Matt J
2023년 12월 10일
But you asked about the command window. Did you mean the editor window? I see no open editor windows in your screenshot.
Walter Roberson
2023년 12월 10일
Lower left corner, there is an untitled.m editor session, which appears to be showing an empty file.
Copying out of the command history and pasting into the editor window would permit creating a script that had the commands.
Walter Roberson
2023년 12월 10일
https://www.mathworks.com/matlabcentral/fileexchange/48593-save-entire-command-history-updated-fast can be used to save the command history.
https://www.mathworks.com/matlabcentral/answers/97504-how-can-i-access-the-saved-command-history-in-matlab talks about where MATLAB saves the command history.
If you up-arrow at the beginning of a command line, the command history will be shown. You can click and drag your selection to select several lines, and you can control-C (command-C on Mac) to copy those commands into your paste buffer.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!