empty
类: coder.Dictionary
命名空间: coder
语法
tf = empty(coderDictionaryObj)
说明
如果 coder.Dictionary
对象 coderDictionaryObj
为空,则
返回 tf
= empty(coderDictionaryObj
)true
。当您使用 coder.dictionary.remove
从模型或数据字典中删除 Embedded Coder 字典时,Embedded Coder 字典会变为空。
输入参数
coderDictionaryObj
— Embedded Coder 字典对象
coder.Dictionary
对象
Embedded Coder 字典,指定为 coder.Dictionary
对象。
输出参量
tf
— true 或 false 结果
1
| 0
| 逻辑数组
true 或 false 结果,以 logical
数据类型的 1
或 0
形式返回。
示例
检查 Embedded Coder 字典对象是否为空
在基础工作区中创建一个名为 'dataDict.sldd'
的数据字典,然后在该数据字典中创建一个 Embedded Coder 字典。在基础工作区中,使用 coder.Dictionary
对象 myCoderDictObj
表示 Embedded Coder 字典。
Simulink.data.dictionary.create('dataDict.sldd'); myCoderDictObj = coder.dictionary.create('dataDict.sldd');
检查 Embedded Coder 字典是否为空。当您创建 Embedded Coder 字典时,来自 Simulink
包的定义会加载到其中,因此字典最初为非空。
empty(myCoderDictObj)
ans = logical 0
从数据字典中删除 Embedded Coder 字典,并再次检查它是否为空。
coder.dictionary.remove('dataDict.sldd');
empty(myCoderDictObj)
ans = logical 1
版本历史记录
在 R2019b 中推出
另请参阅
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)