If is a sparse matrix of the form what is the maximum number of nonzero elements it contains What is the density, where density Such a matrix is termed pentadiagonal. Code a function that applies...




If

is a sparse matrix of the form


what is the maximum number of nonzero elements it contains
What is the density, where density


Such a matrix is termed pentadiagonal.




Code a function


that applies the Gauss-Seidel iteration to solve a system

Your iteration must use only the elements on the five diagonals. Apply the termination criteria




Test your function by solving the

problem


where

is a random matrix generated with the MATLAB command rhs = 100*rand(1000,1). Time the computation. Create the matrix in part

using MATLAB, and solve the system using xmat = A\rhs and compare the two solutions and the time required.





May 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here