필터 지우기
필터 지우기

How to make history.m save for each command in nodesktop mode?

조회 수: 1 (최근 30일)
Alec Nagel
Alec Nagel 2011년 11월 2일
I am using Matlab on a remote server that I ssh to from my MacBook. Partly because I find the Matlab GUI clunky under X11 (which as far as I know is the only way to use the GUI on a remote machine), I use Matlab in the terminal window (by running matlab -nodesktop). This has been working fine, until I now needed to copy some stuff from the command history.
It seems like history.m is only being saved on exit, even though when I check the settings in the GUI, it says that it is being saved for each command. It also seems like exit statements are included in history.m when Matlab is run from terminal, but not in the GUI, so it seems like the settings in the GUI don't apply there. I cannot find anything in the Matlab help pages on how to change the settings for the terminal window.
I need to access the command history for my session while it is still open. Does anybody have an idea about how I can do this -- short of starting to use the GUI in X11?

답변 (1개)

Walter Roberson
Walter Roberson 2011년 11월 2일
You can use the arrow keys to navigate the command history. When you find the command you are looking for, copy-and-paste it if you are writing it to a program or document; or use the arrow keys to move around in it and edit it and then press return to execute the command.
  댓글 수: 1
Alec Nagel
Alec Nagel 2011년 11월 2일
Well, yes, that works I guess. I often need a whole sequence of commands, though, so I was hoping to access the actual history file, so that I can copy and paste them all in one go.

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

카테고리

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