%% Create Time Series from Entire Bag Selection
% Load rosbag. Specify the file path.

bag = rosbag('ex_multiple_topics.bag');

%
% Select a specific topic. Time series only support single topics.

bagSelection = select(bag,'Topic','/odom');

%
% Create time series for the '/odom' topic.

ts = timeseries(bagSelection);

% Copyright 2012 The MathWorks, Inc.