Quantitative finance collector
C++ Matlab VBA/Excel Java Mathematica R/Splus Net Code Site Other
May 31

Matlab File Style

Posted by bo at 18:29 | Code » Matlab | Comments(2) | Reads(8476)
Programming style, a set of rules or guidelines used when writing the source code for a computer program, is important for a programmer, it not only allows the reviewers to know the date and author of the file, but also helps the programmer himself to track the file version and improve work efficiency. Nevertheless, repetitive comments, especially for the header part are boring. Uncomment is even more boring, read Matlab comment stripping for a lazy way for that.
Open in new window

NEWFCN is a good function I always use when creating new files, basically it creates a M-File having the entered filename and a specific structure which helps for creating the main function structure. The actual working MATLAB Version will be also captured. For example, running newfcn('testnewfcn') generates a file named testnewfcn.m at a pre-defined style, the new file looks like
function testnewfcn()
%   ...

%% AUTHOR    : aBiao @ mathfinance.cn
%% $DATE     : 28-May-2010 18:55:27 $
%% $Revision : 1.00 $
%% DEVELOPED : (R14) Service Pack 3
%% FILENAME  : testnewfcn.m

disp(' !!!  You must enter code into this file < testnewfcn.m > !!!')
% ===== EOF ====== [testnewfcn.m] ======  

Did I mention you can customize the exact style by modifying newfcn.m to the appearance you like? just that simple!

Download at http://www.mathworks.com/matlabcentral/fileexchange/6408  

The article is top quality, you can get quite a few exclusive things that cannot be noticed on many other weblogs, really adaptable yet very precise!
war robots hack
hi there.
Pages: 1/1 First page 1 Final page
Add a comment
Enable HTML
Enable UBB
Enable Emots
Nickname   Password   Optional
Site URI   Email   [Register]