function [ MotionData ] = Prep_NormalizeForModel( MotionData, Model )

%combine the data into a large batch
batchdata = cell2mat(MotionData.data'); %flatten it into a standard 2d array

%Normalize the data
data_mean = Model.InputData.mean;
data_std = Model.InputData.std;

for m=1:length(MotionData.data)
    numcases = size(MotionData.data{m},1);
    MotionData.data{m} =( MotionData.data{m} - repmat(data_mean,numcases,1) ) ./ ...
        repmat( data_std, numcases,1);
end


end

