Main Content


Return scenario simulations or actors in current MATLAB session

Since R2022a



    ss = Simulink.ScenarioSimulation.find('ScenarioSimulation') returns all scenario simulations in the current MATLAB® session.


    ss = Simulink.ScenarioSimulation.find('ScenarioSimulation',Name=Value) returns the scenario simulation in the current MATLAB session that contains the actor corresponding to the Name and Value input arguments.


    actor = Simulink.ScenarioSimulation.find('ActorSimulation',Name=Value) returns the actor in the current MATLAB session that corresponds to the Name and Value input arguments.


    collapse all

    Get all simulations in the current MATLAB session.

    scenarios = Simulink.ScenarioSimulation.find('ScenarioSimulation')

    Get the actor specified by a known System object™ handle.

    actor = Simulink.ScenarioSimulation.find('ActorSimulation',SystemObject=obj)

    Get the scenario containing the actor specified by a known System object handle.

    actorScenario = Simulink.ScenarioSimulation.find('ScenarioSimulation',SystemObject=obj) 

    Input Arguments

    collapse all

    Name-Value Arguments

    Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

    Example: Simulink.ScenarioSimulation.find('ActorSimulation', SimulinkModel=12.03) returns the actor with the specified Simulink model handle.

    Simulink model handle of required actor, specified as a double value.

    Run the following command to get the model handle of an open Simulink model file that represents an actor object.


    Example: Simulink.ScenarioSimulation.find('ActorSimulation', SimulinkModel=221.01)

    System object representing actor, specified using the System object name.

    Example: Simulink.ScenarioSimulation.find('ActorSimulation', SystemObject=WhiteCar)

    Output Arguments

    collapse all

    Scenario simulation containing actor, returned as a Simulink.ScenarioSimulation object.

    Actor corresponding to input arguments, returned as a Simulink.ActorSimulation object.

    Version History

    Introduced in R2022a