Add sample to tscollection
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.
If you do not specify data samples for a tscollection
member, that timeseries
will contain NaN
values for the times specified in timevals
for numeric data.
For logical data, the timeseries
will contain
false
values.
When a tscollection
member requires
Quality
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 has
Quality
values, but you only provide data samples, then
0
is added to the existing Quality
array at the times specified in timevals
.