Skip to main content

calcMaximizingCostArrayTerm.m


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


function cost = calcMaximizingCostArrayTerm(modelValue)

maximizingError = 1 ./ modelValue;
maximizingError(maximizingError==inf) = 0;
cost = maximizingError;
end