addsampletocollection
Add sample to tscollection
Description
tscout = addsampletocollection(
adds data samples to the tscin
,'Time',timevals
,tsname
,tsdata
)tscollection
member specified by the
name tsname
for one or more time values.
tsdata
contains the sample data.
To add samples to more than one tscollection
member at a time,
continue to list each tscollection
member name followed by the
corresponding data separated by commas. For example, the command tscout =
addsampletocollection(tscin,'Time',timevals,ts1name,ts1data,ts2name,ts2data)
adds samples to two timeseries
in tscin
simultaneously.
Examples
Input Arguments
Tips
If you do not specify data samples for a
tscollection
member, thattimeseries
will containNaN
values for the times specified intimevals
for numeric data. For logical data, thetimeseries
will containfalse
values.When a
tscollection
member requiresQuality
values, you can specify data quality codes together with the data samples by using the following syntax:tsc = addsampletocollection(tsc,'Time',timevals,... ts1name,ts1cellarray,ts2name,ts2cellarray,...)
Specify the data in the first cell array element and
Quality
in the second cell array element.If a
tscollection
member already hasQuality
values, but you only provide data samples, then0
is added to the existingQuality
array at the times specified intimevals
.
Version History
Introduced before R2006a