MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
trailing white space and comments in a function definition that has no explicit end
statement.

“Code Folding Enabled for Function Code Only” on page 24-24 illustrates this
behavior. Line 13 is excluded from the fold for the foo function.


  • If a fold for a code section overlaps the function code, then the Editor does not show
    the fold for the overlapping section.


The three figures that follow illustrate this behavior. The first two figures, “Code
Folding Enabled for Function Code Only” on page 24-24 and “Code Folding Enabled
for Sections Only” on page 24-25 illustrate how the code folding appears when you
enable it for function code only and then section only, respectively. The last figure,
“Code Folding Enabled for Both Functions and Sections” on page 24-26, illustrates
the effects when code folding is enabled for both. Because the fold for section 3 (lines
11–13) overlaps the fold for function foo (lines 4–12), the Editor does not display the
fold for section 3.

Code Folding Enabled for Function Code Only

24 Coding and Productivity Tips

Free download pdf