Skip to main content

arrayStrToStringArray.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function iterates through the given ArrayStr and adds each item to a
% new MATLAB Array of type string and returns the MATLAB structure. Allows
% easier manipulation of MATLAB string than OpenSim ArrayStr.
%
% (ArrayStr) -> (Array of string)
% Rearranges the ArrayStr into a MATLAB string array


function stringArray = arrayStrToStringArray(arrayStr)
stringArray = string(zeros(1,arrayStr.size()));
for i=0:arrayStr.size()-1
stringArray(i+1) = arrayStr.getitem(i).toCharArray';
end
end