Help Center
Get scenario or static attribute of actor
Since R2022a
staticAttr = get(actorSim,"ActorModel")
scenario = get(actorSim,"ScenarioSimulation")
staticAttr = get(actorSim,"ActorModel") gets the static attributes of the actor specified by actorSim.
staticAttr
actorSim
example
scenario = get(actorSim,"ScenarioSimulation") gets the scenario simulation containing the actor specified by actorSim.
scenario
collapse all
Create sim, a ScenarioSimulation object.
sim
ScenarioSimulation
rrApp = roadrunner("C:\Project\TestHighwayRoute"); openScenario(rrApp,"myScenario1"); sim = createSimulation(rrApp);
Start the simulation.
set(sim,"SimulationCommand","Start");
Pause the simulation.
set(sim,"SimulationCommand","Pause");
Retrieve all actors from the simulation.
actorsim = get(sim,"ActorSimulation");
Get the first actor in the list.
actorOne = actorsim{1};
Get the static specifications of actorOne.
actorOne
staticAttr = get(actorOne,"ActorModel")
Get the simulation containing actorOne.
scenario = get(actorOne,"ScenarioSimulation")
ActorSimulation
Actor, specified as an ActorSimulation object.
ActorModel
Static attributes of actor, returned as an ActorModel object.
Scenario simulation containing actor, returned as a ScenarioSimulation object.
Introduced in R2022a
ActorSimulation | ActorModel | ScenarioSimulation
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
Europe
Asia Pacific
Contact your local office