Main Content


Class: coder.Dictionary
Package: coder

Return coder.dictionary.Section objects of an Embedded Coder Dictionary


sections = getSections(coderDictionaryObj)


sections = getSections(coderDictionaryObj) returns the coder.dictionary.Section objects contained in the Embedded Coder Dictionary that coderDictionaryObj represents. Use the section objects to access code definitions of different types identified by the section names.

Input Arguments

expand all

Embedded Coder Dictionary, specified as a coder.Dictionary object. Before you use this function, represent the dictionary with a coder.Dictionary object by using, for example, the coder.dictionary.create function or the function.

Output Arguments

expand all

Sections of the Embedded Coder Dictionary, returned as an array of coder.dictionary.Section objects.


expand all

Open the model rtwdemo_roll and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Assign the coder.Dictionary object to the variable coderDictObj.

coderDictObj ='rtwdemo_roll')
coderDictObj =

  Dictionary with Sections:

                    StorageClasses: [1×1 coder.dictionary.Section]
                    MemorySections: [1×1 coder.dictionary.Section]
    FunctionCustomizationTemplates: [1×1 coder.dictionary.Section]

Access the sections of the dictionary by using an array of the corresponding coder.dictionary.Section objects.

sectionsArray = getSections(coderDictObj)
sectionsArray = 

  1×3 Section array with properties:


Use each coder.dictionary.Section object to access the entries in that section of the dictionary. The first section contains entries that represent function customization template definitions.

sectObj = sectionsArray(1)
sectObj = 

  Section with properties:

    Name: 'FunctionCustomizationTemplates'
Introduced in R2019b