[SOLVED] CS代考计算机代写 %

30 $

File Name: CS代考计算机代写_%.zip
File Size: 235.5 KB

SKU: 4038815211 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


%
% Exercise 1:
%
% Solve the following nonlinear equation using the Newton method:
%
%x_1 – x_2^2= 0
%x_1^2 + x_2^2 -2 = 0
%
% Start from the pointx = (1.5,0.5).
%

x = [1.5,0.5]’;
iter = 0;
maxiter = 6;

fprintf(‘Starting Point:
’);
fprintf(‘x = %32.5e, %32.5e
’, x);
fprintf(‘
’);

while (iter < maxiter)iter = iter+1;Jacobian_f = [ 1., -2 * x(2); 2 * x(1), 2 * x(2) ];NewtonRHS = [x(1) – x(2) * x(2); x(1) * x(1) + x(2) * x(2) – 2.0];%Add commands to compute the Newton direction as the solution of the%Newton equations and use it to update the vector x%fprintf(‘Newton Method Iteration %4d: ‘, iter);fprintf(‘x = %32.5e, %32.5e
‘, x);end % while (iter < maxiter)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] CS代考计算机代写 %
30 $