![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177726/image.png)
Matlab command history question
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi everyone,
is there any way to recall a command of a long time ago fast and without searching back day by day or is there any log file which saves the command history externally in R2014a?
many thanks in advance
댓글 수: 0
답변 (3개)
Sean de Wolski
2015년 7월 17일
Search it directly!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/177726/image.png)
댓글 수: 2
Sean de Wolski
2015년 7월 17일
Then it's probably gone. The XML file that holds the command history only holds X number of lines where X is set in the preferences.
Bjorn Gustavsson
2015년 7월 17일
To make things like such searches possible I have this in my startup.m-file:
filename = fullfile('/home','bjorn','matlabruns',[datestr(clock,30) '.txt']);
diary(filename)
That saves all commandline-input/output in one file for each matlab session. Then I can search for commands and snippets from any-time ago. I find this a very helpful trick - that I learnt by someone very cunning.
HTH - in the future at least
댓글 수: 0
Azzi Abdelmalek
2015년 7월 17일
편집: Azzi Abdelmalek
2015년 7월 17일
You can find the file history.xml in prefdir
fid=fopen(fullfile(prefdir,'history.xml'))
a=textscan(fid,'%s','delimiter','\n')
fclose(fid)
text=a{:}
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Performance and Memory에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!