MATLAB Command History: How to Back Up Existing History

According to this link:

How to save the contents of the windows of MATLAB commands in a file?

I can back up my comments in the future using diary , which is great:

However, I would also like to back up the existing command history, I believe that the command history is stored in a text file somewhere right? If so, can I just copy it?

+6
source share
2 answers

Take a look at "Save All Command History" , which will allow you to save the entire command history, not just the last 20k allowed by MATLAB.

+2
source

Type prefdir in Matlab and it will provide you with a folder.

The history of your team is located in this folder in a file called history.m .

+6
source

All Articles