Skip to main content

parseTreatmentOptimizationStandard.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function reads the input file and stores the data into
% (numFrames x numColumns).
%
% (Array of string) -> (2D matrix of number)
% returns a 2D matrix of the loaded data trial


function cells = parseTreatmentOptimizationStandard(files)
import org.opensim.modeling.Storage
dataFromFileOne = storageToDoubleMatrix(Storage(files(1)))';
cells = zeros([size(dataFromFileOne) length(files)]);
cells(:, :, 1) = dataFromFileOne;
for i=2:length(files)
cells(:, :, i) = storageToDoubleMatrix(Storage(files(i)));
end
end