%% Cycle Counts of Timetable
% Generate a random signal sampled at 100 Hz for 100 seconds. Store the signal and its time information in a timetable.

fs = 100;
t = seconds(0:1/fs:100-1/fs)';

x = randn(size(t));
TT = timetable(t,x);

%
% Display the reversals and the rainflow matrix of the signal.

rainflow(TT)

% Copyright 2012 The MathWorks, Inc.