Prev: damping coefficient ? DC Motor, Simulink
Next: Combining arrays in a patterned fashion and/or moving rows/columns in a matrix
From: Themie on 3 Jul 2010 12:54 Hey dears, I have a problem with time series and with a method called getsampleusingtime. I have a ts object and the times are in format eg. 13-Jun-2010 17:00:00. Im trying to extract certain periods of this data to new ts objects with getsampleusingtime like this: ts = getsampleusingtime(DATA, datenum(2010, 6, 13, 17, 0, 0), datenum(2010, 6, 13, 17, 4, 59)); But Im getting error like this: ??? Error using ==> timeseries.getsampleusingtime at 82 The specified time value is duplicated in the timeseries. Set the AllowDuplicateTimes flag when calling GETSAMPLEUSINGTIME to obtain samples at a duplicate time It says I would need to set some flag but I can´t figure out what flag I should set and how. There´s no property AllowDuplicateTimes for ts objects and google doesn´t even recognize that phrase. I think this is weird, can you help me? Best, Themis
From: Wayne King on 3 Jul 2010 16:27
"Themie " <themis.remove.t(a)hotmail.com> wrote in message <i0npvb$81m$1(a)fred.mathworks.com>... > Hey dears, > > I have a problem with time series and with a method called getsampleusingtime. I have a ts object and the times are in format eg. 13-Jun-2010 17:00:00. > > Im trying to extract certain periods of this data to new ts objects with getsampleusingtime like this: > ts = getsampleusingtime(DATA, datenum(2010, 6, 13, 17, 0, 0), datenum(2010, 6, 13, 17, 4, 59)); > > But Im getting error like this: > ??? Error using ==> timeseries.getsampleusingtime at 82 > The specified time value is duplicated in the timeseries. Set the AllowDuplicateTimes flag when calling GETSAMPLEUSINGTIME to obtain samples at a duplicate time > > It says I would need to set some flag but I can´t figure out what flag I should set and how. There´s no property AllowDuplicateTimes for ts objects and google doesn´t even recognize that phrase. > > I think this is weird, can you help me? > > Best, Themis The help states the syntax is: ts2 = getsampleusingtime(Data,Time,'ALLOWDUPLICATETIMES',true); Wayne |