Contenu principal

convertToChart

Convertissez une table de transition d’état en diagramme Stateflow

Depuis R2023b

Description

chart = convertToChart(table) convertit la table de transition d’état déverrouillé table en un diagramme Stateflow®.

exemple

Exemples

réduire tout

Cet exemple indique comment convertir une table de transition d’état en un diagramme Stateflow®.

Ouvrez le modèle fourni à titre d’exemple et accédez à l’objet 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.

Convertissez la table de transition d’état en un diagramme 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.

Arguments d'entrée

réduire tout

Table de transition d’état Stateflow à convertir, spécifiée en tant qu’objet Stateflow.StateTransitionTableChart.

Historique des versions

Introduit dans R2023b