function J = CostFunction(x, params, F)
% Write function that computes cost function J
% 
% x is a vector of optimization parameters
% params is a struct that contains all other parameters
% F is a function that takes x as input and returns solution of tumor model

% get g and f from tumor model
[g, f, t] = F(x);

% implement rest 
end
