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
tscollectionmember, thattimeserieswill containNaNvalues for the times specified intimevalsfor numeric data. For logical data, thetimeserieswill containfalsevalues.When a
tscollectionmember requiresQualityvalues, 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
Qualityin the second cell array element.If a
tscollectionmember already hasQualityvalues, but you only provide data samples, then0is added to the existingQualityarray at the times specified intimevals.
Version History
Introduced before R2006a