
321
Appendix B: MATLAB
®
Code
Chapter 1
Code Name Details
graph_examp12.m Solves Example 1.2 using the graphical method
graph_examp14.m Solves Example 1.4 using the graphical method
convexity.m Plots some convex functions
derivative.m Computes and plots rst and second derivatives of a function
grad.m Plots the gradient vector
positive_denite.m Checks whether the square matrix is positive denite
quadr.m Linear and quadratic approximations of a function
quadr_examp12.m Linear and quadratic approximations of a function given in Example 1.2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MATLAB code graph_examp12.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% x1 ...