Main Content

convertToChart

Convert state transition table to Stateflow chart

Since R2023b

Description

chart = convertToChart(table) converts the unlocked state transition table table to a Stateflow® chart.

example

Examples

collapse all

This example shows how to convert a state transition table to a Stateflow® chart.

Open the example model and access the Stateflow.StateTransitionTableChart object.

load_system("convertToChartModel.slx")
ch = find(sfroot,"-isa","Stateflow.StateTransitionTableChart");

Convert the state transition table to a Stateflow chart.

convertedChart = ch.convertToChart
convertedChart = 
  Chart with properties:

                                     Path: 'convertToChartModel/Chart'
                          RequirementInfo: ''
     AllowGlobalAccessToExportedFunctions: 1
                      EnableZeroCrossings: 1
                NoCodegenForCustomTargets: 0
                     NonTerminalMaxCounts: 1000
    RegisterExportedFunctionsWithSimulink: 0
                                   Editor: [1x1 Stateflow.Editor]
                           ActionLanguage: 'MATLAB'
                               ChartColor: [1 0.9608 0.8824]
                           SelectionColor: [1 0 0.5176]
                   ConstantFoldingTimeOut: 40000
                  DerivativesFormatString: '$N_dot'
                         EmlDefaultFimath: 'Same as MATLAB Default'
                             EnableBitOps: 0
                  EnableNonTerminalStates: 0
                  ExecuteAtInitialization: 0
                               ErrorColor: [1 0 0]
                     ExportChartFunctions: 0
                         InitializeOutput: 0
                  FimathForFiConstructors: 'Same as FIMATH for fixed-point input signals'
                              InputFimath: 'fimath(......'
                             PortFontSize: 12
                            JunctionColor: [0.6824 0.3294 0]
                               OutputData: []
                SaturateOnIntegerOverflow: 1
                               StateColor: [0 0 0]
                          StateLabelColor: [0 0 0]
                                StateFont: [1x1 Stateflow.StateFont]
                          TransitionColor: [0.2902 0.3294 0.6039]
                     TransitionLabelColor: [0.2902 0.3294 0.6039]
                                TreatAsFi: 'Fixed-point'
         TreatUndefinedSymbolsAsExtrinsic: 0
                         StateMachineType: 'Classic'
                                  Visible: 1
                            HasOutputData: 0
                     OutputMonitoringMode: 'ChildActivity'
              StateActivityOutputDataType: 'Enum'
                                    Debug: [1x1 Stateflow.ChartDebug]
                           TransitionFont: [1x1 Stateflow.TransFont]
                                  Machine: [1x1 Stateflow.Machine]
                            Decomposition: 'EXCLUSIVE_OR'
              NonTerminalUnstableBehavior: 'Proceed'
                    VariantActivationTime: 'update diagram analyze all choices'
                                     Name: 'Chart'
                               SampleTime: '-1'
                           hadBreakpoints: 0
                              Description: ''
                                    Dirty: 1
                                 Document: ''
                                     Iced: 0
                                   Locked: 0
                    SupportVariableSizing: 1
     TreatDimensionOfLengthOneAsFixedSize: 1
                                      Tag: []
                                       Id: 177
                              ChartUpdate: 'INHERITED'
                       StatesWhenEnabling: 'held'
                         PaperOrientation: 'landscape'
                        PaperPositionMode: 'auto'
                            PaperPosition: [1.9444 2.9028 7.1111 2.6944]
                                PaperSize: [11 8.5000]
                               PaperUnits: 'inches'
                                PaperType: 'usletter'
                        TiledPaperMargins: [0.5000 0.5000 0.5000 0.5000]
                           TiledPageScale: 1
                       ShowPageBoundaries: 'off'

Input Arguments

collapse all

Stateflow state transition table to convert, specified as a Stateflow.StateTransitionTableChart object.

Version History

Introduced in R2023b