BMEN 2401 Lecture Notes - Lecture 11: Gaussian Elimination, Nxp Semiconductors, Mexican Peso

39 views2 pages
26 Nov 2016
School
Course
Professor

Document Summary

K=1 step makes the first column (rows 2 to n) zeros. K=2 step makes the second column (rows 3 to n) zeros. Continue to end of matrix so last variable is solvable ann * xn=an,n+1. Code breaks down if akk^(k-1)=0, because it is in the denominator of equation. This can be fixed by interchanging rows in the matrix: can fix in code with condition: Swap a(1,:) with some other row end: how to swap two rows in a matrix: Need to (cid:272)he(cid:272)k (cid:272)ode every ti(cid:373)e to e(cid:374)sure a zero does(cid:374)"t appear o(cid:374) the diago(cid:374)al resulting in the code breaking down: add condition (one for loop for each indexing variable) ** want the pivot element to be maximum value of pivot row and of matrix. If aik (value of ith row and kthe step)is the (cid:271)otto(cid:373) left (cid:272)or(cid:374)er a(cid:374)d (cid:862)pivot(cid:863) is upper left corner, then.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents