Specify the array layout for each external C function used by the C Caller block.
Category: Simulation Target
Specify the array layout for each external C function used by the C Caller block. The array layout specified for an individual function takes precedence over the option specified in Default function array layout parameter. Use these options to add or remove the array layout setting for an individual C function:
Add custom C function used by the C Caller block and specify the array layout setting.
Remove the custom C function used by the C Caller block.
Parameter:
CustomCodeFunctionArrayLayout |
Type: structure array |
Value:
structure with 'FunctionName'
and 'ArrayLayout' fields.
'ArrayLayout' can be
'Column-major' ,
'Row-major' or
'Any' . |
Default:
' ' |
Consider a model foo_model
. If you
have external C functions that you interface with
the model by using the C Caller block, use these
commands in MATLAB® command window to specify array
layouts for these
functions:
arrayLayout(1).FunctionName = 'MyCFunction1'; arrayLayout(1).ArrayLayout = 'Column-major'; arrayLayout(2).FunctionName = 'MyCFunction2'; arrayLayout(2).ArrayLayout = 'Row-major'; set_param('foo_model', 'CustomCodeFunctionArrayLayout', arrayLayout)
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No recommendation |
Safety precaution | No recommendation |