CH ENGR 109 Quiz: Homework 2 2017

38 views2 pages
9 Jan 2019
School
Professor

Document Summary

Cbe 109 - numerical and mathematical methods in chemical and biological. Due: monday, october 23 (at the beginning of the lecture) The function should has the form [x] = lusolver(a,b), where x is the solution of ax : a is a n-by-n square matrix. (b) test your program using the system: 0x1 + 0x2 + 1x3 1x4 = 1x1 4x2 + 1x3 + 0x4 = 1x1 + 1x2 + 0x3 + 0x4 = Show clearly all steps and terminate the algorithms for | i| = | xm+1 i. |100% < 0. 5, for all i = 1, 2, 3. Compare the speed of convergence between these two methods: (a) create a program using matlab which implements a) jacobi method, and b) gauss- |100% < 0. 5, for all i = 1, 2, 3, 4. The functions should have the form [x] = jacobisolver(a,b) and [x] = gaussseidel- Solver(a,b). (b) test your program using the system: