|
addsample
Add data sample to timeseries object
Syntax
ts = addsample(ts,'Field1',Value1,'Field2',Value2,...)
ts = addsample(ts,s)
Description
ts = addsample(ts,'Field1',Value1,'Field2',Value2,...) adds one or more data samples to the timeseries object ts, where one field must specify Time and another must specify Data. You can also specify the following optional property-value pairs:
'Quality' — Array of data quality codes
'OverwriteFlag' — Logical value that controls whether to overwrite a data sample at the same time with the new sample you are adding to your timeseries object. When set to true, the new sample overwrites the old sample at the same time.
ts = addsample(ts,s) adds one or more new samples stored in a structure s to the timeseries object ts. You must define the fields of the structure s before passing it as an argument to addsample by assigning values to the following optional s fields:
s.data
s.time
s.quality
s.overwriteflag
Remarks
A time-series data sample consists of 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.
The Time value must be a valid time vector.
Suppose that N is the number of samples. The sample size of each time series is given by 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.
Examples
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 flag to overwrite an existing value at time 3.
ts = ts.addsample('Data',3.2,'Quality',1,'OverwriteFlag',...
true,'Time',3);
See Also
delsample, getdatasamplesize, tsprops
Add by Pancho
You can edit it here
|
|
Adding comments is available only for registered users.
|
From the Heart: How Cells Divide to Form Different but Related Muscle Groups
Using the model organism Ciona intestinalis, commonly known as the sea squirt, researchers at the University of California, Berkeley, have uncovered the origins of the second heart field in vertebrates. Sea squirts are bag-like gelatinous creatures whose full genome has been sequenced--one that shares 80 percent of its genes with humans. Though its body is clearly more primitive than creatures with backbones and spinal columns, the sea squirt nevertheless offers a valuable ...
More at http://www.nsf.gov/news/news_summ.jsp?cntn_id=117378&WT.mc_id=USNSF_51&WT.mc_ev=click
This is an NSF News item.
|
|
PycckaR BepcuR
Articles

Library

Downloads

|