Main Content

Simulink.SFunctionBuilder.getSettings

Get settings for S-Function Builder block

Since R2022a

    Description

    sFunSettings = Simulink.SFunctionBuilder.getSettings(blk) returns a structure with fields that indicate the value for each setting for the S-Function Builder block blk.

    Input Arguments

    collapse all

    S-Function Builder block, specified as a block handle or as a string or a character vector that defines the block path.

    Tips

    • To get the block handle for a block in your model, use the getSimulinkBlockHandle function.

    • To get the block handle for the most recently selected or added block, use the gcbh function.

    Output Arguments

    collapse all

    S-Function Builder block settings, returned as a structure that contains these fields:

    • NumberDiscreteStates — Number of discrete states

    • DiscreteStatesIC — Initial conditions for discrete states

    • NumberContinuousStates — Number of continuous states

    • ContinuousStatesIC — Initial conditions for continuous states

    • ArrayLayout — Array layout for code

    • SampleMode — Sample mode for S-function

    • SampleTime — Sample time for S-function

    • NumberOfPWorks — Number of PWorks pointers for S-function

    • UseSimStruct — Whether wrapper has access to SimStruct

    • DirectFeedthrough — Whether S-function has direct feedthrough

    Version History

    Introduced in R2022a