| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
getdatasamplesize(ts)
getdatasamplesize(ts) returns the size of each data sample in a timeseries object.
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.
The following example shows how to get the size of a data sample in a timeseries object.
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)
ans =
1 3The 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.
addsample, size (timeseries), tsprops
![]() | GetCharArray | getDefaultStream (RandStream) | ![]() |

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 |