Skip to main content

calcTrackingOptimizationIntegrand.m


% This function is part of the NMSM Pipeline, see file for full license.
%
% This function calculates the integrand for tracking optimization.
%
% (struct, struct, struct) -> (2D matrix)
% Returns scaled integrand


function integrand = calcTrackingOptimizationIntegrand(values, ...
modeledValues, auxdata)
[costTermCalculations, allowedTypes] = ...
generateCostTermStruct("continuous", "TrackingOptimization");
integrand = calcTreatmentOptimizationCost( ...
costTermCalculations, allowedTypes, values, modeledValues, auxdata);
integrand = integrand ./ (auxdata.maxIntegral - auxdata.minIntegral);
integrand = integrand .^ 2;
end