Main Content

loadPackage

Class: coder.Dictionary
Namespace: coder

Load package of code definitions into Embedded Coder Dictionary

Since R2019b

Syntax

loadPackage(coderDictionaryObj,pkgName)

Description

loadPackage(coderDictionaryObj,pkgName) loads the code definitions in the package pkgName into the Embedded Coder Dictionary that coderDictionaryObj represents.

Input Arguments

expand all

Embedded Coder Dictionary, specified as a coder.Dictionary object.

Package of code definitions to load into the Embedded Coder Dictionary.

Example: 'Simulink'

Examples

expand all

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

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

Load the package mpt into the Embedded Coder Dictionary. You can configure the model to use definitions from the package.

loadPackage(coderDictObj,'mpt')

Version History

Introduced in R2019b