Main Content

本页的翻译已过时。点击此处可查看最新英文版本。

MATLAB 中执行

将独立的 Stateflow® 图作为对象在 MATLAB® 中执行

使用状态图设计逻辑,并将该逻辑作为 MATLAB 程序执行。在 Stateflow Editor 中执行图并对其进行单元测试。用图来控制用户界面和数据处理应用程序的行为。

函数

全部展开

Stateflow.exportAsClassExport MATLAB class for standalone chart
Stateflow.exportToVersionExport standalone chart for use in previous version of Stateflow

Stateflow 语法

全部展开

更改检测

hasChangedDetect change in data since last time step
hasChangedFromDetect change in data from specified value
hasChangedToDetect change in data to specified value

时序逻辑

after在事件广播或指定时间后执行图
atExecute chart at event broadcast or specified time
countChart executions during which condition is valid
elapsedTime since state became active
everyExecute chart at regular intervals
temporalCountNumber of events, chart executions, or time since state became active

主题

Create Stateflow Charts for Execution as MATLAB Objects

Save standalone Stateflow charts outside of Simulink® models.

Execute and Unit Test Stateflow Chart Objects

Run Stateflow charts in MATLAB or through the Stateflow Editor.

Debug a Standalone Stateflow Chart

Interrupt execution to step through each action in a Stateflow chart.

Execute Stateflow Chart Objects Through Scripts and Models

Create a MATLAB script or a Simulink model that invokes a standalone Stateflow chart.

将 MATLAB 代码转换为 Stateflow 流程图

根据您的 MATLAB 代码生成流程图。

特色示例