See other catalogues for
The MathWorks
You may also be interested in
Text version of the page
| | | | | | | | | | | | |
| | | |
| | | Version 7.6 (R2008a) MATLAB® Software | | |
| | | |
| | | Nest Cells for Finer Control You can nest cells in an M-file, including within functions and control statements, such as for loops and if-then blocks. This gives you greater control over how a published document appears. This nesting ability also enables you to evaluate subsections of code on a finer grain when using rapid code iteration. | | |
| | | |
| | | You can insert white space before the double percent (%%) characters that specify a cell break (which is also referred to as a cell divider). This helps to improve readability of the M-file when the cell break is within indented code. In prior releases, the %% characters had to be in the first column of the code. The following image shows a simple example of an M-file with nested cells. | | |
| | | |
| | | IfyoupublishthefiletoHTML(reducingthesizeoftheimages), thecell break nested within the for loop causes MATLAB to publish each iteration of the for loop as it evaluates the code in the loop: | | |
| | | |
| | | 26 | | |
| | | |
| | | | | | | | | | | | |