Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This activity will allow to student to implement Gauss-Seidel method using Matlab Procedure: 1. The greudacede can be found in Applied numerical methods with MATLAB

image text in transcribed

This activity will allow to student to implement Gauss-Seidel method using Matlab Procedure: 1. The greudacede can be found in Applied numerical methods with MATLAB for engineers and scientists by Steven C. Chanra. 3rd ed. page 289 shown below. Function - Guanidel A.,,mzitt Gaussbeidel: Gauss Beidel method * * - Gaumeidel (A)Gauna Seidel without relation input $ A coeficient matriz b- light hand side vetor es - stop criterion default - 0.0000161 mit - iteration Ideault - 50 output: * -olution vector if sarginc2, error at least 2 input arguments required'>, and SE nargincicmptymarit) ait-50nd if sorgin empty lea),-0.00001 end Im, n) - wine its - Free Matrix A must be square'); end C.A Ear I-11 CU, 0; ) *) - 0 end Eur 1-lin Ctitin). Cti,1.m) /Ali, end furiin d) - D/A(1,1) iter - 0 while 2014 - for 1 - 1 *11-0)-ca.** - eni) - abeixtiy-xolatit. 100 and end iter - iter 11 it maxea-aiter >- xt, breat, and end 2. Demonstrate Newton's method using Matlab Calculate the roots of a user defined function with the following specifications Function : gauss seidel Arguments: Y = (A.b, tol) where A is defined as the square coefficient matrix and bis the vector of constant values, and tol is the tolerance Display the number of iterations along with the x-values 3. Put all these codes on am script (or suite of scripts) that is loadable in Matlab, The Matlak function should accept the user defined function as an input argument, and produce a variable containing the answer, egy 1 Questions: 1. Suppose the tolerance is set to default by 0.0001%, how would you modify your codes such that the omax or the maximum iteration will terminate the program and display the result? 2. What can you conclude from this activity

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

Students also viewed these Databases questions

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago