Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Machine Problem 1 Develop your own M-file function for the Gauss- Seidel method without relaxation based on the figure given below, but change the

image text in transcribed

Machine Problem 1 Develop your own M-file function for the Gauss- Seidel method without relaxation based on the figure given below, but change the first line so that it returns the approximate error and the number of iterations: function [x,ea,iter] = GaussSeidel(A,b,es, maxit) Test your program by solving the following linear system: 3x1 0.12 0.1172 0.2x3 = 7.85 0.3x3 = -19.3 0.31 0.22 + 10x3 = 71.4 Note that the solution is x1-3, x2 -2.5, and x3-7. Use initial estimates of x240 and x3-0. function x = Gauss Seidel (A,b,es, maxit) % GaussSeidel: Gauss Seidel method % x = GaussSeidel (A,b): Gauss Seidel without relaxation % input: % A coefficient matrix % b = right hand side vector % es = stop criterion (default = 0.00001%) % maxit max iterations (default = 50) % output: % x = solution vector if nargin

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 Programming questions