%% Convert timeseries Object to Timetable
% Create a timeseries object that has five random numbers, sampled at 10 second intervals.

ts = timeseries(rand(5,1),[0 10 20 30 40])

%
% Display the times and data in ts.

ts.Time
ts.Data

%
% Convert ts to a timetable.

TT = timeseries2timetable(ts)

% Copyright 2020-2021 The MathWorks, Inc.