Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me to simplify this code bu using matlab. This code is about using Jocobi Method to solbe the 16*16 matrix. And the original

please help me to simplify this code bu using matlab. This code is about using Jocobi Method to solbe the 16*16 matrix. And the original question is at third image. thank you so much for helping!!!!! image text in transcribed
image text in transcribed
image text in transcribed
q function x=Jacobi(A,b,x) n=rank (A): Rmax=Inf: tol=le-5; iter=0; Owhile Rmax>tol x old=x for i=1:n sigma=0; for j=l:n sigma=sigma+A(i, j)*x(j); end x(i)=x_old(i)+(b(i)-sigma)/A(i,i); R(i)=b (i)-sigma; end Rmax=max (abs (R)); iter=iter+l; end c = ['No.of Iteration=', num2 str(iter) ); disp (c); end format long e =(-2 i ooooooooooooo 0; 1 -2 i ooooooooooooo; o1 -2 i oooooooooooo; 1 -2 i ooooooooooo; 1 -2 i oooooooo 1 -2 i ooo 1 -2 i ooooo 1 -2 i oooo 1 -2 i ooo o o o o o o o o 1 -2 i o o o o 0; o o o o o o o o o 1 -2 i o o o 0; oo o o o o o o o o 1 -2 1 1 -2 i o0; o o o o o o o o o o o o 1 -2 1 0; 1 -2 1); b=(-1;-2;-2;-2;-2;-2;-2;-2;-2;-2;-2;-2;-2;-2;-2;-1); x=(0;0;0; 0; 0;0;0;0;0; 0; 0; 0; 0; 0; 0; 0); x=Jacobi(A,b,x); 1. (100 Points] Consider a system of linear equations 0 0 0 0 1 -2 1 0 1 -2 1 0 1 -2 0 0 1 ... ... 0 ... 0 0 1 -2 7 9 a : 9 9 7 0 ... 1 -2 1 0 0 ... 1 -2 1 1 -2 | 0 0 0 ... 0 0 0 1 Solve the system by Gauss elimination Solve the system by TDMA. Solve the system by Jacobi iteration. Solve the system by Gauss-Seidel method. Solve the system by the SOR with w=1.7

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_2

Step: 3

blur-text-image_3

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

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions

Question

Draw a picture consisting parts of monocot leaf

Answered: 1 week ago

Question

2. What is the business value of security and control?

Answered: 1 week ago