How scenarios can be generated automatically

조회 수: 3 (최근 30일)
Thaddäus Menzel
Thaddäus Menzel 2019년 4월 2일
댓글: Thaddäus Menzel 2019년 12월 3일
In R2018b there was the helperScenarioReader.m and the mat-files generated by Driving Scenario Designer had a simple structure containing only matrices, so it was very easy to generate such mat files automatically.
But in R2019a the scenarioReader is p-coded and the mat-files generated by Driving Scenario Designer have a very complex structure containing class objects and it seems, that such class objects cannot be initialized outside the GUI of Driving Scenario Designer.
Any idea or solution to create such mat-files in R2019a automatically?

채택된 답변

Roshin Kadanna Pally
Roshin Kadanna Pally 2019년 10월 1일
Hi Thaddaus,
Starting from R2019b, the Scenario Reader can read from a drivingScenario object in MATLAB workspace. See the following page:
Hope this helps.
Roshin
  댓글 수: 5
Muhammad Iqbal
Muhammad Iqbal 2019년 12월 2일
Thanks Thaddaus;
I got It ,but now i want to know about
1. "How to repeat/run the modified scenario 1000 time with simulation run ? "
e.g i have a piece of road as
scenario = drivingScenario;
roadCenters = [0 0; 50 0];
roadWidth = 6;
road(scenario, roadCenters, roadWidth);
how to repeate this 1000 with the model
2.how to get data from generated graph after simulation run?
thanks
Thaddäus Menzel
Thaddäus Menzel 2019년 12월 3일
Hello,
1)
for i=1:1000
% here the scenario or model can be modified
sim('my_model_(file)name(_without_file_ending_slx)')
% here the results can be read
end
2) You have to mark and right click on the corresponding signal you want to read of the model and click on "Log Selected Signals". After simulation you can access all signals, which are logged and marked by an antenna.
After saving the model and simulation you can access the data by SignalName.Time and SignalName.Data.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품


릴리스

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by