Main Content


Remove ego bodies from capsule list


removeEgo(capsuleListObj,egoIDs) removes ego bodies with the specified IDs from the dynamic capsule list.

status = removeEgo(capsuleListObj,egoIDs) additionally returns an indicator of whether an ego body is removed, not found, or a duplicate.

Input Arguments

collapse all

Dynamic capsule list, specified as a dynamicCapsuleList or dynamicCapsuleList3D object.

IDs of ego bodies to remove, specified as a vector of positive integers.

Output Arguments

collapse all

Result of removing ego bodies, specified as N-element column vector of ones, zeros, and negative ones. N is the number of ego bodies specified in the egoIDs argument. Each value indicates whether the body is removed (1), not found (0), or a duplicate (-1). If you specify the same ego ID multiple times in the egoIDs input argument, then all entries besides the last are marked as a duplicate.

Extended Capabilities

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

Introduced in R2020b