bv_cvxbook_extra_exercises

Give an approximate op count of your method i 88 we

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ; m = 200; randn(’state’,1); A=randn(m,n); Of course, you should try out your code with different dimensions, and different data as well. In all cases, be sure that your line search first finds a step length for which the tentative point is in dom f ; if you attempt to evaluate f outside its domain, you’ll get complex numbers, and you’ll never recover. To find expressions for ∇f (x) and ∇2 f (x), use the chain rule (see Appendix A.4); if you attempt to compute ∂ 2 f (x)/∂xi ∂xj , you will be sorry. To compute the Newton step, you can use vnt=-H\g. 8.4 Suggestions for exercise 9.31 in Convex Optimization. For 9.31a, you should try out N = 1, N = 15, and N = 30. You might as well compute and store the Cholesky factorization of the Hessian, and then back solve to get the search directions, even though you won’t really see any speedup in Matlab for such a small problem. After you evaluate the Hessian, you can find the Cholesky factorization as L=chol(H,’lower’). You can then compute a search step as -L’\(L\g), where g is the gradient at the curre...
View Full Document

Ask a homework question - tutors are online