Main Content

Simulink.ActorModel

View static specifications of actor

Since R2022a

    Description

    Use a Simulink.ActorModel object to view the static specifications of an actor in a scenario simulation.

    Creation

    Every Simulink.ActorSimulation object has one corresponding Simulink.ActorModel object that contains static actor properties such as PaintColor. Retrieve the Simulink.ActorModel object of an actor by using the get function of its corresponding Simulink.ActorSimulation object.

    Object Functions

    getAttribute Return static attribute of actor

    Examples

    View Static Specifications of Actor

    Create scenarioSim, a Simulink.ScenarioSimulation object.

    rrApp = roadrunner('C:\Project\TestRoute')
    openScenario(rrApp,'TrajectoryCutIn');
    scenarioSim = createSimulation(rrApp);
    

    Start the simulation.

    set(scenarioSim, 'SimulationCommand', 'Start');

    Pause the simulation.

    set(scenarioSim, 'SimulationCommand', 'Pause');

    Get all the actors from the scenario.

    actorSim = get(scenarioSim, 'ActorSimulation');

    Select a specific actor from the returned actors.

    actorOne = actorSim(1);

    Retrieve Simulink.ActorModel object of the selected actor.

    actorModel = get(actorOne, 'ActorModel');

    Version History

    Introduced in R2022a