Question: Problem 4: (5 Points). Write a function with the header [s] myNR3(f1, f2, f3, x, eps) which solves a system of three non-linear equations (given
Problem 4: (5 Points). Write a function with the header [s] myNR3(f1, f2, f3, x, eps) which solves a system of three non-linear equations (given by function handles 1, 2, and 3) given an initial guess vector x and returns the root vector s. fl, 2 and f3 should be handles to functions of x (and x will be a column vector in R3). Use a convergence criterion on the incrementor (de1x) such that the algorithm keeps going as long as abs (delx) eps. CHECK YOUR ALGORITHM FOR INFINITE LOOPS Hints: 1) In your function, define variables j11, 12, 313, j21, 322, 123, j31, j32, j33 cs anonymous functions which get the output of a call to your my PartialDeriv function from Problem 2. (I will use my own copy of myPartialDeriv when I grade it.) 2) eps can be used for both the convergence criteria and as the last input argument to myPartialDeriv 3) Define the Jacobian J as an anonymous function which creates a matrix of the above function handles (j11, j12, etc., etc.) in the correct locations
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
