Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

getdatasamplesize - Size of data sample in timeseries object

Syntax

getdatasamplesize(ts)

Description

getdatasamplesize(ts) returns the size of each data sample in a timeseries object.

Remarks

A time-series data sample consists of one or more scalar values recorded at a specific time. The number of data samples in is the same as the length of the time vector.

Examples

The following example shows how to get the size of a data sample in a timeseries object.

  1. Load a 24-by-3 data array.

    load count.dat
  2. Create a timeseries object with 24 time values.

    count_ts = timeseries(count,[1:24],'Name','VehicleCount')
  3. Get the size of the data sample for this timeseries object.

    getdatasamplesize(count_ts)
    
    ans =
    
         1     3

The size of each data sample in count_ts is 1-by-3, which means that each data sample is stored as a row with three values.

See Also

addsample, size (timeseries), tsprops

  


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