Main Content


Build S-function without generating MEX file for S-Function Builder block

Since R2022a


    Simulink.SFunctionBuilder.generateCodeOnly(blk) builds the S-function for the specified S-Function Builder block blk without generating the MEX file.

    To build the S-function and generate the MEX file, use the function.

    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.


    • 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.

    Version History

    Introduced in R2022a