MATLAB 帮助中心
清除设置的临时值
clearTemporaryValue(s)
clearTemporaryValue(s) 清除指定设置的临时值。如果临时值未设置或不可写,MATLAB® 将抛出错误。
s
示例
全部折叠
为 MATLAB 中的最大列宽设置临时值,然后再将其清除。
获取根 SettingsGroup 对象,并为 MATLAB 中注释的最大列宽设置临时值。
SettingsGroup
s = settings; s.matlab.editor.language.matlab.comments.MaxWidth.TemporaryValue = 80;
显示 MATLAB 中注释的最大列宽的当前值。由于设置了临时值,因此设置的活动值就是该临时值。有关如何确定活动值的详细信息,请参阅Access and Modify Settings Programmatically。
s.matlab.editor.language.matlab.comments.MaxWidth
ans = Setting 'matlab.editor.language.matlab.comments.MaxWidth' with properties. ActiveValue: 80 TemporaryValue: 80 PersonalValue: <no value> InstallationValue: <no value> FactoryValue: 75
清除临时值。该设置的活动值现在设置为出厂值。
clearTemporaryValue(s.matlab.editor.language.matlab.comments.MaxWidth) s.matlab.editor.language.matlab.comments.MaxWidth
ans = Setting 'matlab.editor.language.matlab.comments.MaxWidth' with properties. ActiveValue: 75 TemporaryValue: <no value> PersonalValue: <no value> InstallationValue: <no value> FactoryValue: 75
Setting
设置,指定为 Setting 对象。使用 settings 函数访问树中的根设置组对象和所有可用设置。
settings
在 R2018a 中推出
settings | addSetting | hasTemporaryValue | clearPersonalValue
addSetting
hasTemporaryValue
clearPersonalValue
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处