plot
输入参数
plan
— 计划
matlab.buildtool.Plan
对象
计划,指定为 matlab.buildtool.Plan
对象。
示例
将任务绘制为依存关系图
将编译计划中的任务绘制为依存关系图。
打开该示例,然后导航到 plot_plan_example
文件夹,其中包含编译文件。
cd plot_plan_example
以下代码显示编译文件的内容。
function plan = buildfile import matlab.buildtool.tasks.CodeIssuesTask import matlab.buildtool.tasks.TestTask % Create a plan from task functions plan = buildplan(localfunctions); % Add the "check" task to identify code issues plan("check") = CodeIssuesTask; % Add the "test" task to run tests plan("test") = TestTask; % Make the "archive" task the default task in the plan plan.DefaultTasks = "archive"; % Make the "archive" task dependent on the "check" and "test" tasks plan("archive").Dependencies = ["check" "test"]; end function archiveTask(~) % Create ZIP file filename = "source_" + ... string(datetime("now",Format="yyyyMMdd'T'HHmmss")); zip(filename,"*") end
从编译文件中加载一个计划。
plan = buildfile
plan = Plan with tasks: archive - Create ZIP file check - Identify code issues test - Run tests
将该计划中的任务绘制为一个依存关系图。该图将任务显示为节点。由于 "archive"
任务依赖 "check"
和 "test"
任务,因此该图还包含表示这些依存关系的两条边。
plot(plan)
版本历史记录
在 R2022b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)