Main Content

Simulink.SFunctionBuilder.getTargetLanguage

Get language for S-function generated using S-Function Builder block

Since R2022a

    Description

    lang = Simulink.SFunctionBuilder.getTargetLanguage(blk) returns the target language for the S-function built by 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 language, returned as one of these values:

    • 'inherit' — Language inherited from the Language (Simulink Coder) model configuration parameter.

    • 'cpp' — C++

    • 'c' — C

    Version History

    Introduced in R2022a