Save currently running script in Matlab
问题 Is there a way of saving the currently running script in Matlab? I have a script which automatically takes a backup of a set of scripts although if I have changed the current script then the saved version will be out of date. Perhaps its possible to call some java? Thanks 回答1: Somewhere on Yair Altman's site (see link in my other answer) he also referred to a blog entry about editorservices, which was introduced with MATLAB R2009b. editorservices.getActive().save should do what you want. 回答2: