%% Create Time Series from Single Property
% Load the rosbag. Specify the file path.

bag = rosbag('ex_multiple_topics.bag');

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

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

%
% Create a time series for the 'Pose.Pose.Position.X' property on the '/odom' topic.

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

% Copyright 2019 The MathWorks, Inc.
%