Question: For matrix A, apply the following methods in the matlab program. Please share the screenshot of the editor and command screens. A=[20514 4424 978 224;4424

For matrix A, apply the following methods in the matlab program. Please share the screenshot of the editor and command screens.

A=[20514 4424 978 224;4424 978 224 54; 978 224 54 14;224 54 14 4];

b = sum(A,2); tol = 1e-6; % relatiev tolerance for convergenve for iterative method maxit = 100; % max number of iterations for iterative methods

% Preconditioned conjugate gradients method. This method is appropriate % for Hermitian positive definite coefficient matrix A x1 = pcg(A,b,tol,maxit); fprintf('Using Preconditioned conjugate gradients method, a solution is obtained as '); disp(x1')

% BiConjugate Gradients Method x2 = bicg(A,b,tol,maxit); fprintf('Using BiConjugate Gradients Method, a solution is obtained as '); disp(x2')

% Conjugate Gradients Squared Method x6= cgs(A,b,tol,maxit); fprintf('Using Conjugate Gradients Squared Method, a solution is obtained as '); disp(x6')

%Biconjugate Gradients Stabilized Method x4= bicgstab(A,b,tol,maxit); fprintf('Using Biconjugate Gradients Stabilized Method,a solution is obtained as '); disp(x4')

%Minimum Residual Method x5= minres(A,b,tol,maxit); fprintf('Using Minimum Residual Method ,a solution is obtained as '); disp(x5')

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!