% This function is part of the NMSM Pipeline, see file for full license.
%
% Takes input EMG data (3D Array of double) of the form numFrames,
% numTrials, numMuscles and returns the format needed for
% MuscleTendonPersonalization.
%
% (3D Array of double) -> (2D Cell Array of struct)
% Returns emgSplines in the correct format
function emgSplines = makeEmgSplines(emgTime, emgData)
emgSplines = cell(size(emgData, 1), size(emgData, 2));
for i=1:size(emgData, 1)
for j=1:size(emgData,2)
emgSplines{i,j} = spline(emgTime(i, :), emgData(i, j, :));
end
end
end