Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please specify which particular one is being done.. thanks secion 2 (questions 13-14 worth 5 marks each for a total of 10 marks) . 13.

please specify which particular one is being done.. thanks image text in transcribed
image text in transcribed
secion 2 (questions 13-14 worth 5 marks each for a total of 10 marks) . 13. Gauss Seidel method is one of the commonly used methods for solving system of linear equations. Followirg is a function that implemented the method. in this function, the parameters are devcribed within the unction using comments. To use this method, the matrix representation (xb) of the system of equations need to convert into x-C +d form. Within the following function, write your code to check that the given matrix A diagonally dominant, if not, print an error message. Also, write your code to generate the iteration matrices C and d used in the Gauss-Seidel method. Use the following formula to calculate the elements of the matrices. Use the given space for each part function Ixi -GaussSeidel( A, b, x0, tol, maxitr) % GaussSeidel solves Ax-b using Gauss-Seidel iteration Inputs: A n x n coefficient matrix b-nx 1 right hand side x0-n x 1 initial guess tol -tolerance maxitr -maximum number of iterations s outputs:x nx 1 solution -s 1 ,error end laennyt mi, ntim diners ions . ), (,bad ifn hi-nn % write your code below to check for diagonally dominant condition i Krite your coda below to generate the iteration matelces C andd c-zeros (size(A)): d-zeroslsize (b)) Calculate the value of x using the iteration matrices c and d xx0: for k 1: maxitr xold x for i = 1 : n end if round xold), 3) tol \Termination Condition

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions