Main Content

restart

Restart simulation of radar scenario

    Description

    example

    restart(scenario) restarts the simulation of the radar scenario, scenario, from the beginning and sets the SimulationTime property of scenario to zero.

    Examples

    collapse all

    Create a new radar scenario.

    scenario = radarScenario;

    Add a platform that follows a 25 m trajectory along the x-axis at 20 m/s.

    plat = platform(scenario);
    plat.Trajectory = waypointTrajectory('Waypoints',[0 0 0; 25 0 0], ...
        'TimeOfArrival',[0 25/20]);

    Run the simulation to completion.

    rec = record(scenario)
    rec=13×1 struct array with fields:
        SimulationTime
        Poses
    
    

    Display the scenario simulation time after the simulation is complete.

    scenario.SimulationTime
    ans = 1.3000
    

    Restart the simulation and confirm that the scenario simulation time is reset to 0.

    restart(scenario);
    scenario.SimulationTime
    ans = 0
    

    Input Arguments

    collapse all

    Radar scenario, specified as a radarScenario object.

    Introduced in R2021a