Page 1 of 1
Problem 8: Write a MATLAB function called gauss_seidel.m to perform the Gauss-Seidel method with relaxation. The A matri
Posted: Fri Jul 08, 2022 6:37 am
by answerhappygod

- Problem 8 Write A Matlab Function Called Gauss Seidel M To Perform The Gauss Seidel Method With Relaxation The A Matri 1 (13.76 KiB) Viewed 48 times

- Problem 8 Write A Matlab Function Called Gauss Seidel M To Perform The Gauss Seidel Method With Relaxation The A Matri 2 (34.79 KiB) Viewed 48 times
Problem 8: Write a MATLAB function called gauss_seidel.m to perform the Gauss-Seidel method with relaxation. The A matrix, b vector, initial guess, and relaxation parameter should be the inputs, and the z vector and number of iterations should be the outputs. Use the architecture laid out in gauss seidel.m on Canvas. Use approximate percent relative error as a stopping criterion with = 10-6.
function [ x, n] = gauss_seidel( A, b, x0, lambda) %%gauss_seidel uses the Gauss-Seidel method to solve Ax = b %%Inputs: A A matrix. b b vector initial guess % % ΧΘ - lambda %%Outputs: x n solution to Ax = b % number of iterations required %% Author: Mr./Ms. Gator, University of Florida end relaxation parameter -