Skip to main content

stdVectorDoubleToDoubleArray.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function iterates through the given StdVectorDouble 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
% StdVectorDouble.
%
% (StdVectorDouble) -> (Array of double)
% Rearranges the ArrayDouble into a MATLAB double array


function doubleArray = stdVectorDoubleToDoubleArray(stdVectorDouble)
doubleArray = zeros(1, stdVectorDouble.size());
for i=0:stdVectorDouble.size()-1
doubleArray(i+1) = stdVectorDouble.get(i);
end
end