Hi,
To test the changes made to a scenario exported from the Driving Scenario Designer app in MATLAB, follow these steps:
Export the Scenario:
- Export your created scenario to a MATLAB function using the Driving Scenario Designer app.
Modify the MATLAB Function:
- Open the exported MATLAB function in MATLAB.
Save the Scenario Data:
- At the end of the function, add the following line to save the scenario data to the workspace:
Launch the drivingScenarioDesigne app:
- Now Run the below command to open the scenario in drivingScenarioDesigner app
drivingScenarioDesigner(data.scenario)
- Now you can visualize the changed scenario in "drivingScenarioDesinger" application.
Please refer the below code for reference:
function scenario = createDrivingScenario()
scenario = drivingScenario;
roadCenters = [38.2 9.9 0;
road(scenario, roadCenters, 'Name', 'Road1');
Hope it helps!