%% Create Time Series from Multiple Properties
% 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 all the angular 'Twist' properties on the '/odom' topic.

ts = timeseries(bagSelection,'Twist.Twist.Angular.X', ...
          'Twist.Twist.Angular.Y', 'Twist.Twist.Angular.Z');

% Copyright 2012 The MathWorks, Inc.