Main Content

save

Save simulation log to file for later use

Since R2023a

    Description

    example

    save(ScenarioSim,'SimulationLog',FileName) saves the log for completed scenario simulation ScenarioSim into file FileName.

    Examples

    collapse all

    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

    collapse all

    Scenario simulation for which log is saved, specified as a ScenarioSimulation object.

    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: 'scenarioRun1'

    Absolute path of the file

    The file is saved in the specified path, which can be outside the current MATLAB search path.

    Example: 'C:\ScenarioSim\metadata\scenarioRun1.rrsimlog'

    Version History

    Introduced in R2023a

    See Also

    |