coder.Dictionary.empty - Determine whether Embedded Coder Dictionary is empty - MATLAB (original) (raw)
Main Content
Class: coder.Dictionary
Namespace: coder
Determine whether Embedded Coder Dictionary is empty
Syntax
tf = empty(coderDictionaryObj)
Description
[tf](#mw%5F2efe4258-356b-45d4-afbf-f94d5ff7ef99) = empty([coderDictionaryObj](#mw%5F6536256a-d780-48c5-a9e9-5beee92e4642))
returns true
if the coder.Dictionary objectcoderDictionaryObj
is empty. When you remove the Embedded Coder Dictionary from a model or a data dictionary by using coder.dictionary.remove, the Embedded Coder Dictionary becomes empty.
Input Arguments
Embedded Coder Dictionary, specified as a coder.Dictionary
object.
Output Arguments
True or false result, returned as a 1
or 0
of data type logical
.
Examples
Create a data dictionary named 'dataDict.sldd'
in the base workspace, and then create an Embedded Coder Dictionary in the data dictionary. In the base workspace, represent the Embedded Coder Dictionary by using thecoder.Dictionary
object myCoderDictObj
.
Simulink.data.dictionary.create('dataDict.sldd'); myCoderDictObj = coder.dictionary.create('dataDict.sldd');
Check if the Embedded Coder Dictionary is empty. When you created the Embedded Coder Dictionary, definitions from the Simulink
package were loaded into it, so the dictionary is initially not empty.
Remove the Embedded Coder Dictionary from the data dictionary and again check to see if it is empty.
coder.dictionary.remove('dataDict.sldd'); empty(myCoderDictObj)
Version History
Introduced in R2019b