%% Return ROS Messages as a Cell Array
%
% Read rosbag and filter by topic and time.

bagselect = rosbag('ex_multiple_topics.bag');
bagselect2 = select(bagselect,'Time',...
[bagselect.StartTime bagselect.StartTime + 1],'Topic','/odom');

%
% Return all messages as a cell array.

allMsgs = readMessages(bagselect2);

%
% Return the first  ten messages as a cell array.

firstMsgs = readMessages(bagselect2,1:10);

% Copyright 2019 The MathWorks, Inc.
%