MATLAB Programming Style Guidelines
by Richard Johnson
11 Oct 2002
(Updated 21 Feb 2003)
Code covered by BSD License
13 pages of advice on writing clear code.
Editor's Notes:
Some users have experienced problems downloading this PDF file due to a bad interaction between Adobe Reader and Internet Explorer. As a workaround, try right-clicking on the "Download this File" link on the right side of the window and use "Save Target As..." to save the file to your computer. You can then view this file directly with Adobe Reader.
This file was a File Exchange Pick of the Week
Download Now
|
Watch this File
|
| File Information |
| Description |
Advice on writing MATLAB code usually addresses efficiency concerns, with recommendations such as "Don't use loops." This document is different. Its concerns are correctness, clarity and generality. The goal of these guidelines is to help produce code that is more likely to be correct, understandable, sharable and maintainable.
This document lists MATLAB coding recommendations consistent with best practices in the software development community. These guidelines are generally the same as those for C, C++ and Java, with modifications for MATLAB features and history. The recommendations are based on guidelines for other languages collected from a number of sources and on personal experience.
This file is also available at http://www.datatool.com/prod02.htm |
| MATLAB release |
MATLAB 6.5 (R13)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (72) |
| 19 Nov 2002 |
Matthew Simoneau
|
|
|
| 19 Nov 2002 |
Penny Anderson
|
|
|
| 17 Dec 2002 |
daniel he
|
|
|
| 24 Dec 2002 |
nandha kumar
|
|
|
| 01 Jan 2003 |
Predrag Kovacevic
|
|
|
| 05 Jan 2003 |
eduardo perez
|
|
|
| 10 Jan 2003 |
Tanveer Yasser
|
|
|
| 22 Jan 2003 |
Lei Wang
|
|
|
| 22 Jan 2003 |
Matlab User
|
|
|
| 22 Jan 2003 |
B G
|
|
|
| 23 Jan 2003 |
a l
|
|
|
| 30 Jan 2003 |
another user
|
|
|
| 12 Feb 2003 |
Angelo Stranieri
|
|
|
| 24 Feb 2003 |
Cristian Gutiérrez
|
|
|
| 11 Mar 2003 |
vikas jain
|
|
|
| 11 Apr 2003 |
John Bucsek
|
|
|
| 16 Apr 2003 |
Dr K. Olp
|
|
|
| 29 Apr 2003 |
Viet Tung NGUYEN
|
|
|
| 12 May 2003 |
Alexander Toniatti
|
|
|
| 30 Jun 2003 |
Adam Remy
|
|
|
| 14 Jul 2003 |
James Cline
|
|
|
| 24 Jul 2003 |
Tom Alen
|
|
|
| 05 Aug 2003 |
ramin vasfpour
|
|
|
| 30 Aug 2003 |
kikaw wahyudi
|
|
|
| 17 Sep 2003 |
old programmer
|
|
|
| 03 Oct 2003 |
Dennis James
|
|
|
| 09 Oct 2003 |
hamid reza mohammadi
|
|
|
| 15 Oct 2003 |
Anatoly Shadrin
|
|
|
| 20 Oct 2003 |
John Solar
|
|
|
| 20 Nov 2003 |
sudharsan kannan
|
|
|
| 10 Dec 2003 |
w j
|
|
|
| 16 Dec 2003 |
Bharani Krishnamurthy
|
|
|
| 13 Jan 2004 |
Fahad Al Mahmood
|
|
|
| 14 Jan 2004 |
Michael Villalba
|
|
|
| 06 Feb 2004 |
Saeed Attarzadeh
|
|
|
| 23 Mar 2004 |
nhgg jhgu
|
|
|
| 27 Mar 2004 |
shivanand b
|
|
|
| 03 Apr 2004 |
nigus Habtu
|
|
|
| 05 Apr 2004 |
Mark Newton
|
|
|
| 07 Apr 2004 |
William Zimmerman
|
|
|
| 13 May 2004 |
aki arso
|
|
|
| 26 May 2004 |
takis soteropoulos
|
|
|
| 17 Jun 2004 |
Gavril Grebenisan
|
|
|
| 22 Jun 2004 |
skr sleem
|
|
|
| 30 Jun 2004 |
Fa Esu
|
|
|
| 26 Jul 2004 |
H Patel
|
|
|
| 28 Jul 2004 |
muthu kumar
|
|
|
| 14 Aug 2004 |
- -
|
|
|
| 04 Sep 2004 |
Marcio Andre Andre
|
|
|
| 07 Oct 2004 |
James Bonanno
|
|
|
| 09 Dec 2004 |
Richard Kirkeeide
|
|
|
| 09 Dec 2004 |
John Solar
|
|
|
| 19 Dec 2004 |
Fu-Sung Wang
|
|
|
| 05 Jan 2005 |
Rene Just Nielsen
|
|
|
| 10 Jan 2005 |
Frederic Bosche
|
|
|
| 16 Jan 2005 |
shafi rahman
|
|
|
| 21 Jan 2005 |
schmitz koeln
|
|
|
| 01 Feb 2005 |
Izru Garner
|
|
|
| 14 Feb 2005 |
Yun-man Jung
|
|
|
| 05 Jul 2005 |
I Am a Loser Loser
|
|
|
| 22 Jul 2005 |
Mohamed Mostafa
|
|
|
| 30 Nov 2005 |
Jas Ellis
|
|
|
| 05 Dec 2005 |
Krishna Pillai
|
|
|
| 15 Apr 2006 |
muhammad islam
|
|
|
| 06 Nov 2006 |
Karthik Raja T
|
|
|
| 03 Jan 2007 |
Vishnuvenkatesh Dhage
|
|
|
| 19 Jun 2007 |
oliv -
|
|
|
| 28 Jun 2007 |
Asaf Horesh
|
|
|
| 10 Apr 2008 |
Jeff Karas
|
|
|
| 10 Apr 2008 |
Patrick Stallings
|
|
|
| 29 Nov 2008 |
Ryan Ollos
|
|
|
| 14 May 2009 |
Braden Hancock
|
|
|
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com