Main Content

Default function array layout


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


Default: Not specified


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


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


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

DebuggingNo impact
TraceabilityNo impact
EfficiencyNo recommendation
Safety precautionNo recommendation

Related Topics