Main Content

getArrayLayout

Class: coder.codedescriptor.CodeDescriptor
Package: 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 a model.

    rtwdemo_comments

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

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

  3. Build the model.

    slbuild('rtwdemo_comments')

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

    codeDescObj = coder.getCodeDescriptor('rtwdemo_comments')
    

  5. Return the array layout of the generated code.

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

Introduced in R2018b