Main Content

getReferencedModelNames

Class: coder.codedescriptor.CodeDescriptor
Package: coder.codedescriptor

Return names of the referenced models

Syntax

refModels = getReferencedModelNames(codeDescObj)

Description

refModels = getReferencedModelNames(codeDescObj) returns a list of referenced models for a coder.codedescriptor.CodeDescriptor object.

Input Arguments

expand all

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

Output Arguments

expand all

A list of referenced models.

Examples

  1. Build the model.

    slbuild('rtwdemo_async_mdlreftop')

  2. Create a coder.codedescriptor.CodeDescriptor object for the required model.

    codeDescObj = coder.getCodeDescriptor('rtwdemo_async_mdlreftop')
    

  3. Return a list of referenced models.

    refModels = getReferencedModelNames(codeDescObj)

refModels has the list of referenced models.

{'rtwdemo_async_mdlrefbot'}

Introduced in R2018a