View License

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

» Watch video

Highlights from
Save a copy of current active *.m file in editor adding time mark.

4.0 | 1 rating Rate this file 3 Downloads (last 30 days) File Size: 2.61 KB File ID: #28669 Version: 1.2

Save a copy of current active *.m file in editor adding time mark.



08 Sep 2010 (Updated )

Current *.m file in editor is saved with name suffixed by '_data_time' under the same directory

| Watch this File

File Information

% Syntax:
% savem_z
% tested for MATLAB 7.4.0 (R2007a), 7.9.0 (R2009b), 7.11.0 (R2010b),
% 7.12.0 (R2011a), 7.13.0 (R2011b)
% on UNIX and PC platforms
% Description:
% Too simple to be stated here.


Insert Header inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.12 (R2011a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
07 Dec 2011 Jie Zhang

Hi Peter,

I am sorry that this code doesn't work in your MATLAB version (R2010a)--I skipped that upgrade, so I didn't have a chance to rewrite my code for that.

I assume there shouldn't be dramatic difference between its adjacent versions (R2009b, R2010b).

If you are interested, maybe we can solve this issue together?

Don't know if you have any instant messenger account--I have MSN, gtalk, skype. You may send to my email:


Comment only
07 Dec 2011 peter

peter (view profile)

I am using Matlab 2010a,
I got this error message when I run savem:
??? Attempted to access slashes(0); index must be a
positive integer or logical.

Error in ==> savem at 55
directory_backup =

Comment only
09 Dec 2010 Ben Cook

Does exactly what it says on the tin.

07 Dec 2011 1.1

Made modifications to work with different versions of MATLAB.

21 Feb 2012 1.2

While fulfilling the request of support for R2007b from another user, ran into a smarter way of doing this.

Contact us