{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

115-05HW3

115-05HW3 - University of California Davis Department of...

This preview shows pages 1–2. Sign up to view the full content.

University of California, Davis Department of Applied Science Fall 2005 David M. Rocke Numerical Methods EAD 115 October 19, 2005 Homework Assignment 3 Due October 26, 2005 1. Do the following problems from the text: 9.8, 10.2–10.4, 10.16. 2. Write a program in a language of your choice to implement Naive Gaussian Elimination. Below is the framework for a VBA implementation (available for download on the web site). You may use this, or you may write the equivalent in another language. Option Explicit Sub Gauss() ’ Declarations Dim A() As Variant, b() As Variant, x() As Variant Dim nrows As Integer, ncols As Integer, n As Integer Dim rng1 As Range, rng2 As Range, rng3 As Range Dim i As Integer, j As Integer, k As Integer Dim factor As Double, sum As Double ’ Get input ranges, check for correct shape, and set arrays Call GetRange(rng1, "Enter n by n input range for matrix of coefficients") Call GetRange(rng2, "Enter n by 1 input range for RHS") Call GetRange(rng3, "Enter n by 1 output range for solution")

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern