主要内容

convertToChart

将状态转移表转换为 Stateflow

自 R2023b 起

说明

chart = convertToChart(table) 将未锁定的状态转移表 table 转换为 Stateflow® 图。

示例

示例

全部折叠

此示例说明如何将状态转移表转换为 Stateflow® 图。

打开示例模型并访问 Stateflow.StateTransitionTableChart 对象。

open_system("sf_debouncer_STT")
table = find(sfroot,"-isa","Stateflow.StateTransitionTableChart");
view(table)

State transition table that contains four states, ON, ON_TO_OFF, OFF_TO_ON, and OFF. The table sets the output data y to 1 when state ON is active and to 0 when state OFF is active.

将状态转移表转换为 Stateflow 图。

chart = convertToChart(table);
view(chart)

Chart that represents the same logic as the original state transition table. The chart contains four states, ON, ON_TO_OFF, OFF_TO_ON, and OFF. The table sets the output data y to 1 when state ON is active and to 0 when state OFF is active.

输入参数

全部折叠

要转换的 Stateflow 状态转移表,指定为 Stateflow.StateTransitionTableChart 对象。

版本历史记录

在 R2023b 中推出