Main Content

slreportgen.utils.isStateTransitionTable

Check if object is state transition table

Since R2022a

    Description

    tf = slreportgen.utils.isStateTransitionTable(obj) returns 1 (true) if the input obj is a State Transition Table block or a Stateflow.StateTransitionTableChart object. Otherwise, the function returns 0 (false).

    example

    Examples

    collapse all

    Open the model sf_stt_boiler.

    openExample("sf_stt_boiler")
    

    Test whether the block State Transition Table is a state transition table.

    path = "sf_stt_boiler/State Transition Table";
    slreportgen.utils.isStateTransitionTable(path)
    ans =
    
      logical
    
       1

    Open the model sf_stt_boiler.

    openExample("sf_stt_boiler")

    Find the Stateflow.StateTransitionTableChart object in the model.

    obj = find(sfroot,"-isa","Stateflow.StateTransitionTableChart");

    Test whether the object is a state transition table.

    slreportgen.utils.isStateTransitionTable(obj)
    ans =
    
      logical
    
       1

    Input Arguments

    collapse all

    Block or Stateflow object to check for being a state transition table, specified as:

    • A string or character vector that contains the object path.

    • A numeric block handle.

    • A Stateflow API object, such as Stateflow.StateTransitionTableChart or Stateflow.Chart. For more information about Stateflow API objects, see Summary of Stateflow API Objects and Properties (Stateflow).

    Version History

    Introduced in R2022a