Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

setabstime (timeseries) - Set times of timeseries object as date strings

Syntax

ts = setabstime(ts,Times)
ts = setabstime(ts,Times,Format)

Description

ts = setabstime(ts,Times) sets the times in ts to the date strings specified in Times. Times must either be a cell array of strings, or a char array containing valid date or time values in the same date format.

ts = setabstime(ts,Times,Format) explicitly specifies the date-string format used in Times.

Examples

  1. Create a time-series object.

    ts = timeseries(rand(3,1))
    
  2. Set the absolute time vector.

    ts = setabstime(ts,{'12-DEC-2005 12:34:56',... 
         '12-DEC-2005 13:34:56','12-DEC-2005 14:34:56'})
    

See Also

datestr, getabstime (timeseries), timeseries

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS