Main Content

updateBoundaryIDs

Update IDs of lane boundaries in lane boundary segment object

Since R2024a

Description

example

lbsegmentUpdated = updateBoundaryIDs(lbsegment,oldIDs,newIDs) updates the specified lane boundary IDs oldIDs in the laneBoundarySegment object lbsegment, with the new lane boundary IDs newIDs, and returns an updated laneBoundarySegment object, lbsegmentUpdated.

Note

This function requires the Scenario Builder for Automated Driving Toolbox™ support package. You can install the Scenario Builder for Automated Driving Toolbox support package from the Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.

Examples

collapse all

Load lane boundary segment data into the workspace.

data = load("laneBoundarySegmentData.mat","lbsegment");

Display the lane boundary IDs of the loaded lane boundary segment object.

lbsegment = data.lbsegment;
data.lbsegment.BoundaryIDs
ans = 4×1 string
    "3"
    "1"
    "2"
    "4"

Assign a new boundary ID, 10, to the existing lane boundary with ID 3. Display the lane boundary segment object.

lbsegment = updateBoundaryIDs(lbsegment,"3","10");

Display the lane boundary IDs of the updated lane boundary segment object.

lbsegment.BoundaryIDs
ans = 4×1 string
    "10"
    "1"
    "2"
    "4"

Input Arguments

collapse all

Lane boundary segment, specified as a laneBoundarySegment object.

Existing lane boundary IDs, specified as an N-by-1 string array. The length of oldIDs must match the length of newIDs.

Note

The new lane boundary ID values and the old lane boundary ID values must be different.

Data Types: string

New lane boundary IDs, specified as an N-by-1 string array. The length of oldIDs must match the length of newIDs.

Note

The new lane boundary ID values and the old lane boundary ID values must be different.

Data Types: string

Output Arguments

collapse all

Updated lane boundary segment, returned as a laneBoundarySegment object.

The returned laneBoundarySegment object lbsegmentUpdated contains the updated lane boundary IDs for the lane boundaries specified in the input laneBoundarySegment object lbsegment.

Version History

Introduced in R2024a