%% Create Straight Four-Lane Road
% Create a driving scenario and the road centers for a straight, 80-meter road.

scenario = drivingScenario;
roadCenters = [0 0; 80 0];

%
% Create a lanespec object for a four-lane road. Use the laneMarking function to specify its five lane markings. The center line is double-solid and double yellow. The outermost lines are solid and white. The inner lines are dashed and white.

solidW = laneMarking('Solid','Width',0.3);
dashW = laneMarking('Dashed','Space',5);
doubleY = laneMarking('DoubleSolid','Color','yellow');
lspec = lanespec([2 2],'Width',[5 5 5 5], ...
    'Marking',[solidW dashW doubleY dashW solidW]);

%
% Add the road to the driving scenario. Display the road.

road(scenario,roadCenters,'Lanes',lspec);
plot(scenario)

%
% Copyright 2012 The MathWorks, Inc.