How to force matlab to save before exit?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
ahmed shaaban
il 25 Mag 2014
Commentato: ahmed shaaban
il 27 Mag 2014
Hello all I am using matlab via server, so I quit MatLab several times before remembering to save. Is there is any way to fore MatLab to save the file code every several minutes. Or method to enforce MatLab to ask for save before quit .
2 Commenti
Jan
il 25 Mag 2014
What exactly is "the file code"? Do you mean the contents of the base workspace, the files opened in the editor or some specific files?
Risposta accettata
Più risposte (1)
Bjorn Gustavsson
il 25 Mag 2014
You should take a look at the help for quit and exit - there it is described that if you have a .m-file finish.m it will run before quiting - so in such a file you can have automatic save commands or something even more elaborate. You might also be interested in the diary function - I start every matlab session with:
diary(fullfile('/home','bjorn','MatlabRuns',[datestr(clock,30) '.txt']))
That way all my commandline activity is saved away. (Got this trick from someone else...)
0 Commenti
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!