calcTrackingCostArray.m
% This function is part of the NMSM Pipeline, see file for full license.
%
% This function calculates the cost for tracking values
%
% (Array of number, Array of number, number, number) -> (struct)
% returns tracking cost
function cost = calcTrackingCostArray(modelValue, ...
experimentalValue, errorCenter, maxAllowableError)
errorMatching = modelValue - experimentalValue;
cost = ((errorMatching(:) - errorCenter) ./ maxAllowableError) ./ ...
sqrt(size(errorMatching(:), 1));
end