Main Content

Default function array layout

Description

Specify how input array data is handled by external C functions. This parameter affects C functions called by C Caller, C Function, MATLAB Function, and MATLAB System blocks and Stateflow® charts.

Category: Simulation Target

Settings

Default: Not specified

Column-major

External C functions assume input array data is in column-major layout.

Row-major

External C functions assume input array data is in row-major layout.

Any

External C functions are indifferent about input data array layout. If your external function algorithms do not require the matrix data to be in a specific array layout, for example if they perform only element-wise operations on input array data, use this option.

Not specified

External C functions make no assumption about input data array layout. However, if Array layout (Simulink Coder) is set to Row-major, Simulink® reports an error. You can turn off the error by changing the External functions compatibility for row-major code generation (Simulink Coder) to warning or none.

The Default function array layout parameter controls the default array layout of custom code functions. To specify array layout for individual functions, click Exception by function.

Command-Line Information

Parameter: DefaultCustomCodeFunctionArrayLayout
Type: character vector
Value: 'Column-major' | 'Row-major' | 'Any' | 'NotSpecified'
Default: 'NotSpecified'

Recommended Settings

ApplicationSetting
DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics