calcWallError.m
% This function is part of the NMSM Pipeline, see file for full license.
%
% Calculate a generic walled error cost. This is generally used for a cost
% with a high penalty outside an allowable error region and low cost
% within it.
%
% (Array of double, double, double, double) -> (Array of double)
% Calculate a generic walled error cost.
function error = calcWallError(values, errorCenter, maxAllowableError, ...
power)
error = ((values - errorCenter) / maxAllowableError) .^ power;
end