Main Content

Support root-level matrix I/O using one-dimensional arrays

Use one-dimensional C arrays to support root-level matrix I/O

Model Configuration Pane: Code Generation > AUTOSAR Code Generation Options

Description

Allow root-level matrix I/O for column-major array layout

Settings

'off' (default) | 'on'
  • 'off' — For column-major array layout, software does not allow matrix I/O at the root level. If you try to build a model that has matrix I/O at the root level, the software produces an error.

  • 'on' — For AUTOSAR component models that use column-major array layout, software supports matrix I/O at the root level by generating code that implements matrices as one-dimensional arrays.

Tips

  • All models in a model hierarchy must specify the same value for this parameter.

  • For an AUTOSAR component model with multidimensional arrays, if you set the model configuration parameter Array layout to Row-major, you can preserve dimensions of multidimensional arrays in the generated C code. Preserving array dimensions in the generated code can enhance code integration.

    When Array layout is set to Row-major, Support root-level matrix I/O using one-dimensional arrays does not apply.

Recommended Settings

ApplicationSetting
DebuggingNo Impact
TraceabilityNo Impact
EfficiencyNo Impact
Safety precautionNo Impact

Programmatic Use

Parameter: AutosarMatrixIOAsArray
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2011a