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