Is it possible to control the size of my Command History contents using MATLAB 7.9 (R2009b)?

4 次查看(过去 30 天)
If I am using a MATLAB session for a long time and executing many commands in the command window, MATLAB does not seem to retain all the commands in the Command History. I am unable to find the commands which were executed at the beginning of the session.

采纳的回答

MathWorks Support Team
In MATLAB 7.9 (R2009b) the Command History will only load up to 20,000 bytes from the history and will consecutively delete and resave the Command History. At any given time, you have either 20,000 bytes in the "history.m" file (available in the preference directory which is given by executing PREFDIR on the MATLAB command prompt) or the size of your last session. The file size is limited so the file does not grow infinitely and slow down MATLAB as MATLAB has to interact with the Command History.
As of MATLAB 7.12 (R2011a) the limit on the Command History File size was increased to 200,000 bytes.
Information about this limitation can be seen in the documentation by executing the following command from the MATLAB command line:
>> web([docroot '/techdoc/matlab_env/f0-17420.html#bs5yxo0-1'])
As a workaround, please use DIARY to maintain a record of all the commands entered in a particular session of MATLAB. For more information about DIARY, please refer to the MATLAB documentation using the following command:
>> doc diary

更多回答(0 个)

类别

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