Main Content

getArrayLayout

Class: coder.codedescriptor.CodeDescriptor
Namespace: coder.codedescriptor

Return array layout of the generated code

Syntax

arrayLayout = getArrayLayout(codeDescObj)

Description

arrayLayout = getArrayLayout(codeDescObj) returns the array layout of the model for which the code is generated.

Input Arguments

expand all

coder.codedescriptor.CodeDescriptor object for which you want to retrieve the information about generated code.

Output Arguments

expand all

Array layout specified for the model by using the model configuration parameter Array layout.

Examples

Create a coder.codedescriptor.CodeDescriptor object for the model that is built, then list the array layout of the generated code.

  1. Open the CustomCodeComments model.

    openExample('CustomCodeComments')
  2. Specify the model configuration parameter Array layout as Row-major. Alternatively, in the command window, use these commands:

    set_param('CustomCodeComments', 'ArrayLayout','Row-major');

  3. Build the model.

    slbuild('CustomCodeComments')

  4. Create a coder.codedescriptor.CodeDescriptor object for the model.

    codeDescObj = coder.getCodeDescriptor('CustomCodeComments')
    

  5. Return the array layout of the generated code.

    arrayLayout = getArrayLayout(codeDescObj)
    arrayLayout has this value:
        'Row-major'

Version History

Introduced in R2018b