i want save in "command window" file automatically. there way it?
you have few options available saving content command window:
you can using diary command. automate records modifying
startup.mfile turn on text logging:diary('mytextlog.txt'); %# text appended if file existsand modify
finish.mfile turn logging off:diary('off');this automatically store entire text content of command window every matlab session, grow rather large text file.
another option besides using diary command , modifying
startup.m,finish.mfiles start matlab using-logfileoption:matlab -logfile "mytextlog.txt"although i'm not sure if overwrite text file or append each time start matlab.
if you're wanting save output evaluating 1 or more expressions, can use evalc function evaluate string containing expression , capture output go command window in character array. can print character array file using fprintf.
finally, if you're not interested in saving displayed output commands type, instead want store commands themselves, command history want. matlab automatically stores
history.mfile maximum size of 200,000 bytes, deleting oldest entries when newer ones added.
Comments
Post a Comment