Skip to main content

parseEmgWithExpansion.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function loads the emg files from disk and expands the number of
% columns of emg data to match the groups indicated in the model. The
% number of columns of emg data should match the number of muscles used in
% the model after this function is complete.
%
% (2D Array of double, 1D Array of double, string, struct) -> (None)
% parses the emg files and expands them to the correct size


function emgData = parseEmgWithExpansion(model, files)
dataFromFileOne = expandEmgDatas(model, files(1));
emgData = zeros([length(files) size(dataFromFileOne)]);
cells(1, :, :) = dataFromFileOne;
for i=2:length(files)
cells(i, :, :) = expandEmgDatas(model, files(2));
end
end