save
Description
save(
saves the log for completed scenario simulation ScenarioSim
,"SimulationLog",FileName
)ScenarioSim
into file
FileName
.
Examples
Save a Simulation Log to a File
Create ScenarioSim
, a ScenarioSimulation
object.
rrApp = roadrunner("C:\Project\TestRoute"); openScenario(rrApp,"TrajectoryCutIn"); ScenarioSim = createSimulation(rrApp);
Enable scenario simulation logging in MATLAB®
set(ScenarioSim,Logging="On");
Start the simulation, and let it play to completion.
set(ScenarioSim,SimulationCommand="Start");
Save the scenario simulation log.
save(ScenarioSim,"SimulationLog","scenarioRun1");
Input Arguments
ScenarioSim
— Scenario simulation
ScenarioSimulation
object
Scenario simulation for which log is saved, specified as a
ScenarioSimulation
object.
FileName
— Name of file to which simulation log is saved
character vector | string
Name of file in which simulation log is stored, specified as a character vector or
string. The rrsimlog
extension of the file is not included. The name
of the file must be unique in the current path.
FileName
can be expressed in one of these ways, depending on
the location in which you want to save the file.
Name of the file | The file is saved in the current folder. Example:
|
Absolute path of the file | The file is saved in the specified path, which can be outside the current MATLAB search path. Example:
|
Version History
Introduced in R2023a
MATLAB Command
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
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)