This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.

setabstime (tscollection)

Set times of tscollection object as date strings


tsc = setabstime(tsc,Times)
tsc = setabstime(tsc,Times,format)


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

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


  1. Create a tscollection object.

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

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

Introduced before R2006a

Was this topic helpful?