Question: 4. Consider the function. f(x, y, z)=x+y+z+sin (az) - e-(2+y +2). Write a code that evaulates the Hessian matrix for any choice of r,
4. Consider the function. f(x, y, z)=x+y+z+sin (az) - e-(2+y +2). Write a code that evaulates the Hessian matrix for any choice of r, y and 2. 5. Generate a random vector in matrix with entries = [1, 2, 3, 4, 5]. Create a tridiagonal matrix of the form T = x1 h 0 0 0 h h 0 0 h 0 0 0 X2 h 13 h 0 h 0 I4 0 0 h 15 where h 0.1. Now extend the code so that it can generate an n x n tri diagonal matrix for any vector with n entries and any choice of h.
Step by Step Solution
3.40 Rating (172 Votes )
There are 3 Steps involved in it
Heres a Python code to evaluate the Hessian matrix of the given function and to generate an nxn trid... View full answer
Get step-by-step solutions from verified subject matter experts
