| Contents | Index |
Add data sample to timeseries object
ts1 = addsample(ts, s)
ts1 = addsample(ts, 'Data', data-value, 'Time',time-value,..., Name,Value)
ts1 = addsample(ts, s) adds one or more new data samples stored in a structure s to the timeseries object ts.
ts1 = addsample(ts, 'Data', data-value, 'Time',time-value,..., Name,Value) adds one or more data samples to the timeseries object ts along with additional options specified by one or more Name,Value pair arguments.
If N is the number of data samples, you can get the sample size of each time with SampleSize = getsamplesize(ts).
When ts.IsTimeFirst is true, the size of the data is N-by-SampleSize. When ts.IsTimeFirst is false, the size of the data is SampleSize-by-N.
Specify optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.
ts1 |
The timeseries object that results when you add the specified samples to the original timeseries object. |
One or more values recorded at a specific time. The number of data samples in a time series is the same as the length of the time vector.
Add a data value of 420 at time 3:
ts = ts.addsample('Time',3,'Data',420);Add a data value of 420 at time 3 and specify quality code 1 for this data value. Set the OverwriteFlag to overwrite an existing value at time 3.
ts = ts.addsample('Data',3.2,'Quality',1,'OverwriteFlag',...
true,'Time',3);delsample | getdatasamples | timeseries
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |