Preface ........................................................ ix
Introduction .................................................... i
1  General Principles ........................................... 4
2  Formatting ................................................... 7
   Layout ....................................................... 7
   White Space ................................................. 12
   Code Blocs .................................................. 15
   Formatting Summary .......................................... 17
3  Naming ...................................................... 18
   General ..................................................... 19
   Variables and Parameters .................................... 24
   Constants ................................................... 33
   Structures and Cell Arrays .................................. 35
   Functions ................................................... 37
   Classes ..................................................... 42
   Data Files and Directories .................................. 45
   Naming Summary .............................................. 48
4  Documentation ............................................... 49
   General ..................................................... 49
   Comments .................................................... 51
     Header Comments ........................................... 58
     Block Comments ............................................ 66
     Interspersed or Inline Comments ........................... 69
   Documentation Summary ....................................... 69
5  Programming ................................................. 71
   General ..................................................... 71
   Variables and Constants ..................................... 73
   Character Strings ........................................... 81
   Structures .................................................. 83
   Cell Arrays ................................................. 85
   Expressions ................................................. 87
   Statements .................................................. 90
   Loops ....................................................... 91
   Conditionals ................................................ 96
   Logical Functions .......................................... 103
   Vectorization .............................................. 104
   Functions .................................................. 105
   Input and Output ........................................... 116
   Classes and Objects ........................................ 119
   Exceptions, Errors, and Warnings ........................... 128
   Output Style ............................................... 131
   Tests ...................................................... 131
   Data Files ................................................. 135
   Programming Summary ........................................ 136
6  Files and Organization ..................................... 138
   Toolboxes .................................................. 138
   Project Files .............................................. 140
   Organization Summary ....................................... 142
7  Development ................................................ 144
   Design ..................................................... 145
   Development Practices ...................................... 147
   MATLAB IDE Tools ........................................... 149
   Development Summary ........................................ 152
Keywords ...................................................... 155
Is* function list ............................................. 157
Glossary ...................................................... 159
Bibliography .................................................. 165
Index ......................................................... 167
 |