%% Create Time Series from Single Property
% 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 'Pose.Pose.Position.X' property on the '/odom' topic.

ts = timeseries(bagSelection,'Pose.Pose.Position.X');

% Copyright 2012 The MathWorks, Inc.