# Class17 - Class meeting#17 Wednesday Oct 20th GEEN 1300...

• Notes
• 14

This preview shows page 1 - 5 out of 14 pages.

1Class meeting #17Wednesday, Oct. 20thGEEN 1300Introduction to Engineering ComputingExcel & Visual Basic for Applications (VBA)designing the Gaussian Elimination algorithmimplementation in VBA1Homework #8 posted, due Wednesday, November 10th[double-weighted project assignment]Start by representing the set of equations in a general form:a xaxaxaxbaxaxaxaxbnnn1111221331n121122223322. . .. . .a xaxa xba xaxaxbiiii iiinnikiik iiknnk1111......,,2a xaxaxbniin iinnnn11...,
2Abstract the coefficients and constantsinto an Amatrix and bvector1112131n12122232n2aaaabaaaabiii,i1inikik i1knkaaabaaabCurrentpivotelement3kik ,i1knknin,i1nnnaaabElement belowpivot in row kthat is beingreducedthe “big picture”Gaussian Elimination Algorithm Designstartdo forward passdo back-substitution pass4end
3proceed fromfrom row 1 to row ndown through theaugmented matrixstarti=1i=i+1i>n?end offorwardTFnormalizethe ithrow firstreduce eachnow, expand thisblocknormalize row ik=i+1k=k+1k>n?passTF5element belowthe i,i pivot allthe way to thebottomk k 1reduce row kbelow pivot row ithe j index goes across row ifrom column i+1 (one to theright of the pivot) to the endNormalize row iNote: we don’t haveto divide aiiby itselfto get 1. We alreadyknow that this will bethe result, and wenever use aiiagainin the algorithm.j=i+1j=j+1j>n?TFaij= aij/ aiibi= bi/ aii6divide the row elementby the pivot elementfinally, divide the constantin row i by the pivot element
4proceed fromfrom row 1 to row ndown through theaugmented matrixstarti=1i=i+1i>n?