| Contents | Index |
Remove sample from timeseries object
ts1 = delsample(ts,Name,Value)
ts1 = delsample(ts,Name,Value) deletes samples from the timeseries object ts based on the specified Name,Value pair arguments.
ts |
A timeseries object. |
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.
'Index' |
The indices of the time vector that correspond to the samples you want to delete. |
'Value' |
The time values that correspond to the samples you want to delete. |
ts1 |
The timeseries object that results from removing the specified samples. |
Create a timeseries object, and then remove samples:
ts = timeseries(rand(5,1),[10 20 30 40 50]); % Remove data sample at time index 1 ts1 = delsample(ts,'Index', 1) % Remove data sample at time value 20: ts2 = delsample(ts,'Value', [20])
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |