Main Content


Save simulation log to file for later use

Since R2023a



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


    collapse all

    Create ScenarioSim, a ScenarioSimulation object.

    rrApp = roadrunner('C:\Project\TestRoute');
    ScenarioSim = createSimulation(rrApp);

    Enable scenario simulation logging in MATLAB®


    Start the simulation, and let it play to completion.


    Save the scenario simulation log.


    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