Code covered by the BSD License  

Highlights from
Open new m-file with standard header text in editor

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 2.66 KB File ID: #34148

Open new m-file with standard header text in editor

by Kevin Bartlett

 

09 Dec 2011

Creates a new m-file with standard function header text.

| Watch this File

File Information
Description

Creates a new m-file in the current directory. The m-file is created with a standard header text, giving the Matlab version, operating system, author, date and time and, optionally, the author's organization (the values for the author and organization are customizable).

The m-file created is opened automatically in the Matlab editor.

The following is the contents of the m-file named 'myprogram.m', created with the command
  newmf myprogram

function [] = myprogram()
%
% myprogram.m--
%
% Syntax:
%
% e.g.,

% Developed in Matlab 7.12.0.635 (R2011a) on GLNX86.
% Ada Lovelace (ada@example.com), 2011-12-09 12:29
%-------------------------------------------------------------------------

MATLAB release MATLAB 6.0 (R12)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
12 Dec 2011 Jan Simon

See also: http://www.mathworks.com/matlabcentral/fileexchange/4908-m-file-header-template , http://www.mathworks.com/matlabcentral/fileexchange/12323 , http://www.mathworks.com/matlabcentral/fileexchange/6408

12 Dec 2011 Kevin Bartlett

Thanks for pointing those out. I searched the FileExchange for similar functions before posting newmf.m, but InsertHeader (which does not do quite the same thing) was the only one I found. I guess I didn't look hard enough.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
development Kevin Bartlett 12 Dec 2011 11:26:39
editor Kevin Bartlett 12 Dec 2011 11:26:39
boilerplate Kevin Bartlett 12 Dec 2011 11:26:39
header Kevin Bartlett 12 Dec 2011 11:26:39
function Kevin Bartlett 12 Dec 2011 11:26:39

Contact us at files@mathworks.com