MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
类: mlreportgen.dom.ProgressMessage 命名空间: mlreportgen.dom
确定消息是否通过过滤器
tf = passesFilter(message,filter)
tf = passesFilter(message,filter) 确定消息是否通过过滤器。
tf
message
filter
示例
全部展开
此示例显示如何添加在生成报告时显示的进度消息。
向报告添加调度程序和侦听程序。配置调度程序以包含调试消息。
import mlreportgen.dom.*; d = Document("test","html"); dispatcher = MessageDispatcher.getTheDispatcher; dispatcher.Filter.DebugMessagesPass = true; l = addlistener(dispatcher,"Message", ... @(src, evtdata) disp(evtdata.Message.formatAsText));
创建进度消息。
open(d); dispatch(dispatcher, ProgressMessage("starting chapter",d)); p = Paragraph("Chapter "); p.Tag = "chapter title"; p.Style = { CounterInc("chapter"),... CounterReset("table"),WhiteSpace("pre") }; append(p,AutoNumber("chapter")); append(d,p);
生成报告并删除侦听程序。
close(d); rptview("test","html"); delete(l);
检查 MATLAB® 命令行窗口中的进度消息。除了预定义的 DOM 进度消息之外,还出现了本例中添加的 starting chapter 消息。输出还包括调试消息。
starting chapter
mlreportgen.dom.ProgressMessage
DOM 进度消息,指定为 mlreportgen.dom.ProgressMessage 对象。
mlreportgen.dom.MessageFilter
与进度消息一起使用的过滤器,指定为 mlreportgen.dom.MessageFilter 对象。
1 - 消息通过指定的过滤器(调度程序处理该消息)
1
0 - 消息未通过指定的过滤(调度程序忽略该消息)
0
在 R2014b 中推出
mlreportgen.dom.MessageFilter | mlreportgen.dom.ProgressMessage
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处