function obj = objective(par)

global y_ref

% simulate model

y = simulate(par);

% calculate objective

obj = sum((y-y_ref).^2) / length(y); % mean squared error

end
