View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

Join the 15-year community celebration.

Play games and win prizes!

» Learn more

5.0 | 1 rating Rate this file 5 Downloads (last 30 days) File Size: 3.11 KB File ID: #34577 Version: 1.2



Robert Cumming (view profile)


13 Jan 2012 (Updated )

Save current editor files, can be used to easily reopen all files from a previous project/session.

| Watch this File

File Information

Working on multiple projects?
This function allows you to save the current editor files for easy access in the future by addition of a shortcut toolbar, multiple sessions can be saved for returning to at any point in the future.

Notes: Tested on 2006a to 20011b and R2013b (assumptions made on other versions).

On post R2012b - if you change the icon its not remembered when you add new sessions.

Tested on both Windows and LINUX (not on MAC)

SaveCurrentEditorFiles ( 'project A' ); % This will store all the open files associated with "project A" for future access.

Other projects can be added.

To retrieve, click on the "Saved Editor Sessions" on the shortcuts tool bar and enter the integer associated with the project (integer and project description written to the command window)


This file inspired Editor Session Manager.

Required Products MATLAB
MATLAB release MATLAB 8.2 (R2013b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
24 May 2012 Warwick

Thank you. All fixed now. No, it's not new in any way. (I may have blundered earlier when I tried to update a project name.) I have about nearly 10 projects and subprojects, and I find this script so useful and time-saving.
Matlab should have this as a builtin.

Comment only
23 May 2012 Robert Cumming

Robert Cumming (view profile)

Something must have gone wrong with one of the indexes saved or you have none saved locally (is this a new computer?) - the data are saved in the shortcuts.xml in the prefdir.
To completely reset - delete the matlab shortcut. You can remove items by providing a 2nd argument at runtime which is true -> i.e. SaveCurrentEditorFiles ( refName, 1 );

Comment only
22 May 2012 Warwick

When I hit the SavedEditorSessions icon I get the error "Reference to non-existent field 'name'. " even with nothing in the Workspace.
How can I reset or at least get back to a blank state? I tried deleting and reloading the file but the error is still there.

Comment only
21 Jan 2012 Warwick

Thanks, Daniel and Robert. In the code, I added '2012b' immediately after the 2 instances of '2011b' and it works nicely in V 2012b, now.

Comment only
16 Jan 2012 Robert Cumming

Robert Cumming (view profile)

@Warwick - excellent thats good to know.
Regarding R2012X you would need to update two switch statements (the editor interface has changed in both 2010 and 11 and I have no visibility to 2012...) one at the top and one near the bottom of the file. I will update later.

Comment only
15 Jan 2012 Daniel

Daniel (view profile)

@Warwick, have a look at the code and the switch statement at the beginning. Simply try to extend the cases to R2012b.

Comment only
14 Jan 2012 Warwick

This is a very useful addition for me as I usually have a few different ongoing projects.
It works fine on Mac version of R2011b. However, on the (beta) R2012a (Mac) it doesn't work and returns "version not supported".

18 Jan 2012 1.1

Addition of R2012a and R2012b (assumption that interface doesn't change from 2011a/b)

25 Apr 2014 1.2

Update to work on R2013b (assumtion made on other versions R2012b onwards)

Contact us