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. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

getabstime

Convert tscollection time vector to cell array

Syntax

tsctime = get(tsc)

Description

example

tsctime = get(tsc) returns a cell array whose elements are the dates in the time vector associated with a tscollection object tsin.

Examples

collapse all

Create a tscollection object and define its start date.

tsc = tscollection(timeseries([3 6 8 0 10]'));
tsc.TimeInfo.StartDate = '10/27/2005 07:05:36';

Display the vector of absolute time values.

tsctime = getabstime(tsc)
tsctime = 5x1 cell array
    {'27-Oct-2005 07:05:36'}
    {'27-Oct-2005 07:05:37'}
    {'27-Oct-2005 07:05:38'}
    {'27-Oct-2005 07:05:39'}
    {'27-Oct-2005 07:05:40'}

Input Arguments

collapse all

Input tscollection, specified as a scalar.

Tips

  • To define the tscollection time vector relative to a calendar date, set the TimeInfo.StartDate property to a valid date character vector. Valid dates can have the following formats:

    FormatExample
    dd-mmm-yyyy HH:MM:SS01-Mar-2000 15:45:17
    dd-mmm-yyyy01-Mar-2000
    mm/dd/yy03/01/00
    mm/dd03/01
    HH:MM:SS15:45:17
    HH:MM:SS PM3:45:17 PM
    HH:MM15:45
    HH:MM PM3:45 PM
    mmm.dd,yyyy HH:MM:SSMar.01,2000 15:45:17
    mmm.dd,yyyyMar.01,2000
    mm/dd/yyyy03/01/2000

Introduced before R2006a