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

1 vue (au cours des 30 derniers jours)
Alec Nagel
Alec Nagel le 2 Nov 2011
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?

Réponses (1)

Walter Roberson
Walter Roberson le 2 Nov 2011
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 commentaire
Alec Nagel
Alec Nagel le 2 Nov 2011
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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Entering Commands dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by