MATLAB 帮助中心
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.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处