Skip to main content

getTimeSeriesTableColumnNames.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function extracts the data of the OpenSim TimeSeriesTable object
% to a MATLAB array of strings. The array does not include 'time',
% only dependent column names.
%
% (TimeSeriesTable) -> (Array of string)
% Extracts column names as string


function output = getTimeSeriesTableColumnNames(timeSeriesTable)
strings = {};
columnNames = timeSeriesTable.getColumnLabels();
for i=1:columnNames.size()-1
strings{end+1} = columnNames.get(i);
end
output = string(strings);
end