getdatasamplesize
Size of one data sample of a timeseries.
Category: Language Fundamentals > Data Types
Syntax
sz = getdatasamplesize(ts)
Returns the dimensions of a single sample.
Description
The time dimension of Data is separated out, and the rest describes one sample. A series of scalars has sample size [1 1]; a series with two channels per instant has [1 2].
Input arguments
tstimeseriesobject.
Output arguments
sz- Row vector of sizes, excluding the time dimension.
Example
Scalar and two-channel series
getdatasamplesize(timeseries((1:4)', (0:3)'))
getdatasamplesize(timeseries([1 2; 3 4; 5 6], (0:2)'))
Output
ans = 1×2
1 1
ans = 1×2
1 2