**matlab中warning函数用法**

1、warning函数:
显示警告消息。

2、用法说明:
此 MATLAB 函数 显示警告消息并设置 lastwarn 函数的警告状态。如果 msg 为空,则 warning 将重置 lastwarn 的警告状态,但不显示任何文本。
warning(msg)
warning(msg,A1,…,An)
warning(msgID,___)
warning(state)
warning(state,msgID)
warning
warnStruct = warning
warning(warnStruct)
warning(state,mode)
warnStruct = warning(state,mode)
另请参阅 dbstop, disp, error, errordlg, lasterror, lastwarn, sprintf, warndlg

3、例子:

 warning(['Your directory containes unremoved score cache files. Results may not be accurate.'...
       'Please remove any file in the format aXX.rr_* : ' ]);

警告: Your directory containes unremoved score cache files. Results may not be accurate.Please remove any file in the format aXX.rr_* :
注:
warning on 开启警告/显示警告
warning off 关闭警告/不显示警告
如:
(1)

 warning(['Your directory containes unremoved score cache files. Results may not be accurate.'...
       'Please remove any file in the format aXX.rr_* : ' ]);
        warning off 

(2)

warning(['Your directory containes unremoved score cache files. Results may not be accurate.'...
       'Please remove any file in the format aXX.rr_* : ' ]);
        warning on
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值