Skip to main content

arrayDoubleToDoubleArray.m


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


function doubleArray = arrayDoubleToDoubleArray(arrayDouble)
doubleArray = zeros(1, arrayDouble.size());
for i=0:arrayDouble.size()-1
doubleArray(i+1) = arrayDouble.getitem(i);
end
end