coder.Dictionary.getSection - Return coder.dictionary.Section object that represents Embedded

  Coder Dictionary section - MATLAB ([original](https://in.mathworks.com/help/ecoder/ref/coder.dictionary.getsection.html)) ([raw](?raw))

Main Content

Class: coder.Dictionary
Namespace: coder

Return coder.dictionary.Section object that represents Embedded Coder Dictionary section

Syntax

sectionObj = getSection(coderDict,sectionName)

Description

[sectionObj](#mw%5F012a7331-eed6-4123-807c-ce52e704466a) = getSection([coderDict](#mw%5F3afa1c22-d6a5-4a13-bba2-7e7b08b6e49a),[sectionName](#mw%5Fa1a55211-6195-4c0d-90f2-32e8b1cf5c19)) returns a coder.dictionary.Section object that represents one section,sectionName, of an Embedded Coder Dictionary, whichcoderDict represents. Use the section to access the code definitions of the type identified by the section name.

Input Arguments

expand all

Embedded Coder® Dictionary that contains the section you want to access, specified as acoder.Dictionary object.

Name of the section you want to access in the Embedded Coder Dictionary, specified as a string scalar or character vector. The section name identifies the type of code definitions that the section contains. The sections in the dictionary depend on the code interface configuration type of the dictionary.

A service interface configuration contains these sections:

A data interface configuration contains these sections:

Output Arguments

expand all

Section in the Embedded Coder Dictionary, returned as acoder.dictionary.Section object. The section contains coder.dictionary.Entry objects that represent code definitions of the type identified by sectionName.

Examples

expand all

Open the model RollAxisAutopilot and represent the Embedded Coder Dictionary by using a coder.Dictionary object. Assign thecoder.Dictionary object to the variablecoderDictObj.

openExample("RollAxisAutopilot") coderDictObj = coder.dictionary.open("RollAxisAutopilot")

coderDictObj =

Dictionary with Sections:

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

Represent the Storage Classes section of the Embedded Coder Dictionary by using acoder.dictionary.Section object namedSCSectObj.

SCSectObj = getSection(coderDictObj,"StorageClasses")

SCSectObj =

Section with properties:

Name: 'StorageClasses'

Version History

Introduced in R2019b

expand all

Access the sections of Embedded Coder Dictionaries that use the service interface configuration. You can still access sections in Embedded Coder Dictionaries that use the data interface configuration.