Main Content

updateWorldPoints

Update world points in world point set

Since R2020b

Description

wpSet = updateWorldPoints(wpSet,pointIndices,worldPoints) updates the locations of the world points at the specified indices pointIndices of the world point set wpSet. Use this syntax if you added points using the addWorldPoints function without specifying unique point identifiers pointIds.

example

wpSet = updateWorldPoints(wpSet,pointIds,worldPoints) updates the locations of the world points specified by the point identifiers pointIds, of the world point set wpSet.Use this syntax if you added points using the addWorldPoints function by specifying unique point identifiers pointIds.

example

Examples

collapse all

Generate 3-D world points.

worldPoints = rand(100,3);

Create a worldpointset object.

wpSet = worldpointset;

Add the world points to the world point set.

wpSet = addWorldPoints(wpSet,worldPoints);

Update the first 50 world points with new locations.

pointIndices = 1:50;
newWorldPoints = worldPoints(pointIndices,:) + [0 0 5];
wpSet = updateWorldPoints(wpSet,pointIndices,newWorldPoints);

Generate 3-D world points.

worldPoints = rand(100,3);

Generate pointIds.

pointIds = randperm(100);

Create a worldpointset object.

wpSet = worldpointset;

Add the world points to the world point set.

wpSet = addWorldPoints(wpSet,worldPoints,pointIds);

Update the first 50 world points with new locations.

newWorldPoints = selectWorldPoints(wpSet,pointIds(1:50)) + [0 0 5];
wpSet = updateWorldPoints(wpSet,pointIds(1:50),newWorldPoints);

Input Arguments

collapse all

World point set, specified as a worldpointset object.

World point indices, specified as a scalar or an N-element vector of integers. This input is valid when sequential indices are used for the points in the wpSet object.

World point identifiers, specified as an M-element vector of integers. M is the number of world points. This input is valid when points were added using addWorldPoints.

World points coordinates, specified as an M-by-3 matrix in the form [x y z].

Output Arguments

collapse all

World point set, returned as a worldpointset object.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2020b