Skip to Main Content Skip to Search
Product Documentation

getdatasamplesize - Class: timeseries

Size of data sample in timeseries object

Syntax

getdatasamplesize(ts)

Description

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

Input Arguments

ts

String specifying the name of a timeseries object.

Definitions

data sample

One or more scalar values recorded at a specific time. The number of data samples is the same as the length of the time vector.

Examples

After loading data and creating a timeseries object, get the size of a data sample:

% Load a 24-by-3 data array:
load count.dat

% Create a timeseries object with 24 time values:
count_ts = timeseries(count,[1:24],'Name','VehicleCount')

% Get the size of the data sample for this timeseries object:
getdatasamplesize(count_ts)

MATLAB returns the following, which indicates that the size of each data sample in count_ts is 1-by-3. In other words, MATLAB stores each data sample as a row with three values.

ans =

     1     3

See Also

set | timeseries

  


» Learn more
» Download free kit
» Get trial software

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