Main Content

updateGridResolution

Update grid resolution of road surface data

Since R2025b

Description

Add-On Required: This feature requires the Scenario Builder for Automated Driving Toolbox add-on.

updateGridResolution(rsObj,gridResolution) updates the grid resolution of the point cloud data in the road surface object rsObj to the specified resolution gridResolution.

example

Examples

collapse all

Load a road surface object into the workspace.

data = load("roadSurfaceObject.mat");
rsObj = data.rsObj;

Display the grid resolution values in the loaded road surface object.

disp([rsObj.LateralResolution rsObj.LongitudinalResolution])
    0.0100    0.0100

Specify new grid resolution values of 5 cm each in the longitudinal and lateral directions.

gridResolutionNew = [0.05 0.05];

Update the road surface object with the new grid resolution values.

updateGridResolution(rsObj,gridResolutionNew)

Display the updated grid resolution values in the loaded road surface object.

disp([rsObj.LateralResolution rsObj.LongitudinalResolution])
    0.0500    0.0500

Input Arguments

collapse all

Road surface object, specified as a roadSurface object.

Grid resolution of the road surface data, specified as a scalar or a two-element vector of the form [longitudinalResolution lateralResolution]. Units are in meters.

If you specify a scalar, the function uses the same value for both longitudinalResolution and lateralResolution.

This argument sets the LongitudinalResolution and LateralResolution properties of the roadSurface object rsObj.

Data Types: double

Version History

Introduced in R2025b