{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw06_p03c_newton

# hw06_p03c_newton - f function g_x = gx xold yold zold g_x =...

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

function [xnew, ynew, znew] = hw06_p03a_newton( xold, yold, zold ) A(1,1) = fx(xold, yold, zold); A(1,2) = fy(xold, yold, zold); A(1,3) = fz(xold, yold, zold); A(2,1) = gx(xold, yold, zold); A(2,2) = gy(xold, yold, zold); A(2,3) = gz(xold, yold, zold); A(3,1) = hx(xold, yold, zold); A(3,2) = hy(xold, yold, zold); A(3,3) = hz(xold, yold, zold); A b(1,1) = -f(xold, yold, zold); b(2,1) = -g(xold, yold, zold); b(3,1) = -g(xold, yold, zold); b delta = A\b; xnew = xold + delta(1,1); ynew = yold + delta(2,1); znew = yold + delta(2,1); z function f_x = fx( xold, yold, zold ) f_x = 3.0; f function f_y = fy( xold, yold, zold ) f_y = zold*sin(yold*zold); f function f_z = fz( xold, yold, zold ) f_z = yold*sin(yold*zold);
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: f function g_x = gx( xold, yold, zold ) g_x = 8.0*xold; g function g_y = gy( xold, yold, zold ) g_y = -1250.0*yold+2.0; g function g_z = gz( xold, yold, zold ) g_z = 0.0; g function h_x = hx( xold, yold, zold ) h_x = -yold*exp(-xold*yold); h function h_y = hy( xold, yold, zold ) h_y = -xold*exp(-xold*yold); h function h_z = hz( xold, yold, zold ) h_z = 20.0; h function f_ = f( xold, yold, zold ) f_ = 3.0*xold - cos(yold*zold) - 0.5; f function g_ = g( xold, yold, zold ) g_ = 4.0*xold^2 - 625.0*yold^2 * 2.0*yold - 1.0; g function h_ = h( xold, yold, zold ) h_ = exp(-xold*yold) - 20.0*zold + 1.0/3.0*(10.0*pi-3.0);...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online