getdatasamplesize(ts) returns the size of each data sample in a timeseries object.
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.
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