Main Content

find

Class: coder.dictionary.Section
Namespace: coder.dictionary

Search in Embedded Coder Dictionary section

Syntax

foundEntries = find(sectionObj,Name1,Value1,...,NameN,ValueN)

Description

foundEntries = find(sectionObj,Name1,Value1,...,NameN,ValueN) searches the Embedded Coder Dictionary section sectionObj by using search criteria Name1,Value1,…,NameN,ValueN, and returns an array of matching entries that were found in that section.

Input Arguments

expand all

Section to search in the Embedded Coder Dictionary, specified as a coder.dictionary.Section object.

Search criteria, specified as one or more name-value pairs representing names and values of properties of the definitions in the Embedded Coder Dictionary section. For a list of the properties of an Embedded Coder Dictionary entry, see coder.dictionary.Entry.

Example: 'MemorySection','memSect1'

Example: 'DataScope','Exported'

Output Arguments

expand all

Embedded Coder Dictionary entries that match the specified search criteria, returned as an array of coder.dictionary.Entry objects.

Examples

expand all

Open the model RollAxisAutopilot and create an Embedded Coder Dictionary in the model. Represent the Embedded Coder Dictionary by using the coder.Dictionary object coderDictionary. Use this object to access the Storage Classes section of the dictionary, which contains the storage class definitions.

openExample('RollAxisAutopilot')
coderDictionary = coder.dictionary.open('RollAxisAutopilot');

Create a coder.dictionary.Section object that represents the Storage Classes section of the Embedded Coder Dictionary.

storageClassesSect = getSection(coderDictionary, 'StorageClasses');

Find the storage classes that have DataScope set to Exported.

exportedSCs = find(storageClassesSect,'DataScope','Exported')
exportedSCs = 

  1×2 Entry array with properties:

    Name
    DataSource

Version History

Introduced in R2019b