function [JVal, gradient] = functionCost(theta) JVal = theta' * theta; gradient = theta; % ========================================================================= end