Skip to main content

calcDeviationCostArray.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function calculates the cost for deviation values
%
% (Array of number, Array of number, number, number) -> (struct)
% returns deviation cost


function cost = calcDeviationCostArray(value, errorCenter, ...
maxAllowableError)

cost = ((value(:) - errorCenter) ./ maxAllowableError) ./ ...
sqrt(size(value(:), 1));
end