removeData
Syntax
Description
removeData(
removes actor information for the specified timestamps trackdata
,Timestamp=timestamps
)timestammps
from
the actorTracklist
object trackdata
.
removeData(
removes actor information for the specified row indices trackdata
,RowIndices=rowIndices
)rowIndices
from
the actorTracklist
object trackdata
.
removeData(
removes actor information for the specified track IDs trackdata
,TrackIDs=trackIDs
)trackIDs
from the
actorTracklist
object.
Note
This function requires the Scenario Builder for Automated Driving Toolbox™ support package. You can install Scenario Builder for Automated Driving Toolbox from the Add-On Explorer. For more information about installing add-ons, see Get and Manage Add-Ons.
Examples
Remove Data from Actor Track List Object Using Row Indices
Load an initialized actorTracklist
object into the workspace.
actorObject = load("actorTracklistObject.mat");
actorObject = actorObject.actorObject;
Display the details of the actorTracklist
object.
disp(actorObject)
actorTracklist with properties: TimeStamp: [600x1 double] TrackIDs: {600x1 cell} ClassIDs: {600x1 cell} Position: {600x1 cell} Dimension: [] Orientation: [] Velocity: [] Speed: [] StartTime: 3.8300e-04 EndTime: 29.9514 NumSamples: 600 UniqueTrackIDs: [18x1 string]
Specify the row indices for which to remove data from the actorTracklist
object.
idxs = (1:5)';
Remove the first five rows of data from the actorTracklist
object.
removeData(actorObject,RowIndices=idxs)
Display the details of the actorTracklist
object after data removal.
disp(actorObject)
actorTracklist with properties: TimeStamp: [595x1 double] TrackIDs: {595x1 cell} ClassIDs: {595x1 cell} Position: {595x1 cell} Dimension: [] Orientation: [] Velocity: [] Speed: [] StartTime: 0.2506 EndTime: 29.9514 NumSamples: 595 UniqueTrackIDs: [18x1 string]
Remove Data from Actor Track List Object Using Timestamp
Load an initialized actorTracklist
object into the workspace.
actorObject = load("actorTracklistObject.mat");
actorObject = actorObject.actorObject;
Display the details of the actorTracklist
object.
disp(actorObject)
actorTracklist with properties: TimeStamp: [600x1 double] TrackIDs: {600x1 cell} ClassIDs: {600x1 cell} Position: {600x1 cell} Dimension: [] Orientation: [] Velocity: [] Speed: [] StartTime: 3.8300e-04 EndTime: 29.9514 NumSamples: 600 UniqueTrackIDs: [18x1 string]
Extract the timestamps for which to remove data from the actorTracklist
object.
ts = actorObject.TimeStamp(1:10);
Remove the data from the actorTracklist
object for the specified timestamps.
removeData(actorObject,Timestamp=ts)
Display the details of the actorTracklist
object after data removal.
disp(actorObject)
actorTracklist with properties: TimeStamp: [590x1 double] TrackIDs: {590x1 cell} ClassIDs: {590x1 cell} Position: {590x1 cell} Dimension: [] Orientation: [] Velocity: [] Speed: [] StartTime: 0.4998 EndTime: 29.9514 NumSamples: 590 UniqueTrackIDs: [18x1 string]
Remove Data from Actor Track List Object Using Track IDs
Load an initialized actorTracklist
object into the workspace.
actorObject = load("actorTracklistObject.mat");
actorObject = actorObject.actorObject;
Display the recorded track IDs for the first timestamp.
disp(actorObject.TrackIDs{1})
"4" "13" "22"
Specify a track ID for which to remove data from the actorTracklist
object.
tid = "4";
Remove the data for the specified track ID from the actorTracklist
object.
removeData(actorObject,TrackIDs=tid)
Display the recorded track IDs for the first timestamp after data removal.
disp(actorObject.TrackIDs{1})
"13" "22"
Input Arguments
trackdata
— Actor track list information
actorTracklist
object
Actor track list information, specified as an actorTracklist
object.
timestamps
— Timestamps for which to remove track information
scalar | N-element column vector
Timestamps for which to remove track information, specified as a scalar or an N-element column vector. N is the number of recorded timestamps for which to remove data. Units are in seconds.
After timestamp removal, the trackdata
object automatically
arranges the remaining timestamps in increasing order.
Data Types: single
| double
rowIndices
— Row indices of actor track list data to remove
positive integer | N-element column vector of positive integers
Row indices of actor track list data to remove, specified as a positive integer or
an N-element column vector of positive integers. N
is the number of row indices of the trackdata
input for which to
remove data. Values must be in the range [1, NumSamples
], where
NumSamples
is the value of the NumSamples
property of the input actorTracklist
object trackdata
.
Data Types: single
| double
| uint8
| uint16
| uint32
| uint64
trackIDs
— Track IDs of actors for which to remove data
scalar | N-by-1 string array
Track IDs of the actors for which to remove data, specified as a scalar or an
N-by-1 string array. N is the number of track
IDs for which to remove data from the input trackdata
.
When you specify a track ID for removal, the function removes the ID from the
UniqueTrackIDs
property, as well as all data associated with the
track ID in the ClassID
, Position
,
Dimension
, Orientation
,
Velocity
, and Speed
properties. This can
result in empty elements in any property with its size determined by the number of
timestamps in the data.
Version History
Introduced in R2023a
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)