Specify MATLAB Function Properties in a Chart

Set MATLAB Function Properties

To specify properties for a MATLAB® function in a Stateflow® chart:

  1. In the Stateflow chart, right click the MATLAB function.

  2. Select Properties.

    In the dialog box that appears, there are tabs for both General and Documentation Properties.

  3. Specify properties for the MATLAB function.




    MATLAB function read only name. Click the link to open the function contents in the MATLAB editor.

    Function Inline Option

    Determine whether the function is inlined in the generated code by choosing one of the following options:

    • If set to Auto internal heuristics are used to determine whether or not to inline the MATLAB function.

    • If set to Inline inlining of the function is forced.

    • If set to Function inlining of the function is prevented.

    Saturate on integer overflow

    Select to specify that integer overflows saturate in the generated code. For more information, see Handle Integer Overflow for Chart Data.

    MATLAB Function fimath

    Setting defines the fimath properties for the MATLAB function. The fimath properties specified here are associated with all fi and fimath objects constructed in the MATLAB function. Choose one of the following options:

    • If set to Same as MATLAB, the function uses the same fimath properties as the current global fimath. The edit box appears dimmed and displays the current global fimath in read-only form. For more information on the global fimath and fimath objects, see the Fixed-Point Designer™ documentation.

    • If set to Specify Other, you can specify your own fimath object. This can be done by either of these two methods:

      1. Construct the fimath inside the edit box.

      2. Construct the fimath object in the MATLAB or model workspace and enter its variable name in the edit box.


    Text defining the label of the MATLAB function in the Stateflow chart.


    Textual description/comment.

    Document link

    Link to documentation about the MATLAB function. Enter a Web URL address or a MATLAB expression that, when evaluated, displays documentation . Examples are , mailto:email_address and edit /spec/data/speed.txt.

  4. Click Apply.

Was this topic helpful?