hw7_solution

# hw7_solution - 1 J =[2*x(1 2*x(2 Jacobian matrix J(x at...

This preview shows pages 1–2. Sign up to view the full content.

1. Determine a solution to the given equations using the Newton-Raphson method. Below is my code and output. Code: % ASE 311, HW 7, problem 1. % Date: 21 Oct 09. clear all clc %% x = [1;1]; i = 0; tol = 1e-4; while (1) i = i+1; f = [x(1)^2 + x(2)^2 - 5 ; ... % f(x) at step k x(1)^2 - x(2)

This preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: - 1]; J = [2*x(1) 2*x(2); ... % Jacobian matrix J(x) at step k 2*x(1) -1 ]; x = x - J\f; % iterate on x. .. f = [x(1)^2 + x(2)^2 - 5 ; ... % f(x) at step k+1 x(1)^2 - x(2) - 1]; if norm(f,2) < tol break end end x i Output: x = 1.6005 1.5616 i = 4...
View Full Document

{[ snackBarMessage ]}

### Page1 / 2

hw7_solution - 1 J =[2*x(1 2*x(2 Jacobian matrix J(x at...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online