Main Content

createStateflowChartBehavior

Add Stateflow chart behavior to component

Since R2021a

Description

createStateflowChartBehavior(component) adds Stateflow® Chart behavior to a component component. The connections, interfaces, requirement links, and stereotypes are preserved. The component must have no subcomponents and must not already be linked to a model.

Note

Components with physical ports cannot be saved as architecture models, model references, software architectures, or Stateflow chart behaviors. Components with physical ports can only be saved as subsystem references or as subsystem component behaviors.

example

Examples

collapse all

Add Stateflow chart behavior to the component named "robotComp" within the current model.

Create a model named "archModel".

model = systemcomposer.createModel("archModel");
systemcomposer.openModel("archModel");
arch = get(model,"Architecture");

Add two components to the model electricComp and robotComp. Rearrange the model.

names = ["electricComp","robotComp"];
comp = addComponent(arch,names);
Simulink.BlockDiagram.arrangeSystem("archModel")

Add Stateflow chart behavior to the robotComp component.

createStateflowChartBehavior(comp(2));

Input Arguments

collapse all

Component with no subcomponents, specified as a systemcomposer.arch.Component object.

More About

collapse all

Version History

Introduced in R2021a