%You may create a separate module or execute these lines of code on console instantly
options = optimset('Gradobj', 'on', 'MaxIter', '100');
initialTheta = zeros(2,1);
[optTheta, functionVal, exitFlag] = fminunc(@costFunction, initialTheta, options);