MATLAB 帮助中心
重置 System object 的内部状态
reset(obj)
reset(obj) 会将 System object™ 的内部状态和输入属性重置为其初始值。
obj
如果 obj 写入或读取文件,reset 会将该对象重置到该文件的开头。
reset
如果 obj 更改属性,reset 会将属性重置为其初始默认值。
如果 obj 使用随机数字生成种子,reset 会重置种子属性。
示例
全部折叠
使用 reset 方法重置 System object counter 的内部状态和输入属性。有关 counter 的类定义,请参考 setup 中的示例。
counter
setup
创建 Counter 对象并设置属性。
Counter
obj = Counter; obj.UseIncrement = false
obj = Counter with properties: UseIncrement: false UseWrapValue: true StartValue: 1 Increment: 1 WrapValue: 10
重置并释放该对象。
reset(obj) release(obj)
您要重置其状态的 System object。
全部展开
有关详细信息,请参阅 MATLAB 代码生成中的 System object (MATLAB Coder)。
在 R2010a 中推出
release
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处