Dynamic array container type
Model Configuration Pane: Code Generation / Code Style
Description
Specify a container type for 1-dimensional dynamic arrays in the generated code. Choose
either coder::array or std::vector.
This parameter affects only 1-dimensional dynamic arrays. For higher-dimensional dynamic
arrays, the code generator generates coder::array containers regardless of
the value of this parameter.
Dependencies
To enable this parameter, set the Language model configuration parameter to
C++.
Settings
std::vector (default) | coder::arrayDefault:
std::vector
std::vectorThe code generator generates
std::vectorcontainers to represent 1-dimensional dynamic arrays.coder::arrayThe code generator generates
coder::arraycontainers to represent 1-dimensional dynamic arrays. If you open a model that was created before R2024b, the model defaults to this setting.
Examples
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No impact |
| Safety precaution | No recommendation |
Programmatic Use
Parameter:
DynamicArrayContainerType
|
Type:
character vector |
Values:
'std::vector' |'coder::array' |
Default:
'std::vector' |
Version History
Introduced in R2024b