MATLAB Compiler    

Setting Indentation Spacing

Use the statement-indent:n option to set the indentation of all statements to n, an integer. The default is 4 spaces of indentation. To set the indentation for expressions, use expression-indent:n. This sets the number of spaces of indentation to n, an integer, and defaults to two spaces of indentation.

Default Indentation

Not specifying indent formatting options uses the default of four spaces for statements and two spaces for expressions. For example, using

generates the following code segment:

Modified Indentation

This example shows the same segment of code using a statement indentation of two and an expression indentation of one:

generates the following code segment:


  Listing All Formatting Options Including M-File Information in Compiler Output