Main Content

Specify by function

Description

Specify which custom code functions are deterministic, that is, always producing the same outputs for the same inputs. This parameter is enabled only when the Deterministic functions parameter is set to By Function. If a custom code function is specified as deterministic, then a C Caller or C Function block that calls that function can be used in a For Each subsystem or with continuous sample time, and the block is optimized for use in conditional input branch execution. When a block is optimized for use in conditional input branch execution, it is executed only if it is in the active branch of a Switch or Multiport Switch block, both in simulation and in generated code. See Conditional input branch execution.

Category: Simulation Target

Settings

Specify the names of custom code functions that are deterministic, that is, always producing the same outputs for the same inputs.

Add

Add a name to the list of custom code deterministic functions.

Remove

Remove a name from the list of custom code deterministic functions.

Tip

If you do not see a list of your custom code functions in the Specify by function dialog, close the dialog, click Validate custom code, and click Specify by function again.

Command-Line Information

Parameter: CustomCodeDeterministicFunctions
Type: character vector
Value: names of custom code functions, separated by commas
Default: ''

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics