[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Undefined array key 78
[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Trying to access array offset on value of type null
Answer Happy • MATLAB HW HELP: Consider the following linear system of equations AX=B: [8 1 3; 2 0 5; 1 7 3]*[x_1; x_2; x_3] = [1; 4; -
Page 1 of 1

MATLAB HW HELP: Consider the following linear system of equations AX=B: [8 1 3; 2 0 5; 1 7 3]*[x_1; x_2; x_3] = [1; 4; -

Posted: Sat Feb 26, 2022 10:57 am
by answerhappygod
MATLAB HW HELP:
Consider the following linear system of equations AX=B:
[8 1 3; 2 0 5; 1 7 3]*[x_1; x_2; x_3] = [1; 4; -1]
(a) Solve the system using Gauss Seidel method (solve by hand). At
each step, calculate the
relative norm of the residuals (||r^(k)|| / ||B||) and stop
when it reaches a tolerance of 0.1.
a) Modify the Gauss-Seidel function you completed in Lab 6
Assignment, such that the
function will first checks if the diagonal entries are zero. If
needed, the function will
swap the row that has a zero diagonal element with the next
suitable row in A such that a
matrix with non-zero diagonal elements is obtained. The function
needs to record the
swapping process by creating a permutation matrix, P. Subsequently,
your function will
start to solve the system using Gauss-Seidel. In addition to the
maximum number of
iterations, your function will also get tolerance as input:
- Inputs of your function: A, B, initial guess for X, tolerance,
maximum number of
iterations
- Output of your function: numerical solution for X
b) Use your function from Part (a) to solve the above system. Set
the tolerance for relative
norm of residuals to 0.01. Report the following:
- In a PDF file report the number of iterations needed to reach
this accuracy, and
output of your code for solution X.
- Your MATLAB code in .m or .mlx format
Matlab Hw Help Consider The Following Linear System Of Equations Ax B 8 1 3 2 0 5 1 7 3 X 1 X 2 X 3 1 4 1
Matlab Hw Help Consider The Following Linear System Of Equations Ax B 8 1 3 2 0 5 1 7 3 X 1 X 2 X 3 1 4 1 (111.93 KiB) Viewed 55 times
Problem 1) Consider the following linear system of equations AX=B: 18 2 1 1 0 7 31 [X1 x2 = 3) (X3. 4 || B (a) Solve the system using Gauss Seidel method (solve by hand). At each step, calculate the relative norm of the residuals (Locom) and stop when it reaches a tolerance of 0.1. a) Modify the Gauss-Seidel function you completed in Lab 6 Assignment, such that the function will first checks if the diagonal entries are zero. If needed, the function will swap the row that has a zero diagonal element with the next suitable row in A such that a matrix with non-zero diagonal elements is obtained. The function needs to record the swapping process by creating a permutation matrix, P. Subsequently, your function will start to solve the system using Gauss-Seidel. In addition to the maximum number of iterations, your function will also get tolerance as input: Inputs of your nction: A, B, initial guess for X, tolerance, maximum number of iterations Output of your function: numerical solution for X b) Use your function from Part (a) to solve the above system. Set the tolerance for relative norm of residuals to 0.01. Report the following: In a PDF file report the number of iterations needed to reach this accuracy, and output of your code for solution X. Your MATLAB code in .m or .mlx format