EGR 103/Fall 2017/Lab 8

From PrattWiki
Jump to navigation Jump to search
  • Some of the problems ask about norms and condition numbers. You will need to read Chapra 11.2 (pp. 292-297) to learn about norms and condition numbers. The summary version is:
    • A norm gives you a measure of the size of the entries in a vector or matrix.
      • For vectors, you need to know how 1, 2, e (Euclidean), and \(\infty\) norms are calculated and be able to calculate them by hand.
      • For matrices, you need to know how 1, f (Frobenius), and \(\infty\) norms are calculated and be able to calculate them by hand. The calculation of a matrix 2-norm is beyond the scope of this class.
    • A condition number of a matrix gives an idea of the sensitivity of the solution relative to the sensitivity of the measurements. The larger the condition number, the more difficult the geometry and thus the more prone to error the results are to measurement errors. The rule of thumb is that your final answer will have as many digits of precision as the number of digits in your measurements minus the base-10 logarithm of the condition number.
      • For instance, if you take measurements to 5 significant figures and your system has a condition number of 100, you expectation is that your solution is accurate to \(5-\log_{10}(100)=5-2=3\) digits.
      • You generally report ranges of digits if the condition number is not an integer power of 10. For instance, if you know your measurements to 9 figures and your condition number of 485, \(\log_{10}(485)=2.69\) so you will lose between 2 and 3 digits of precision meaning you know your final answers to within 6-7 digits (9 minus 2 or 3).
  • The first three problems primarily require setting up the appropriate matrix of coefficients of your unknowns and vector of solutions, which can then be used to solve for your unknowns using left divide. In some cases the equations are already given in the right "form" - in others, you will need to get the unknowns on one side and the constant terms on the other.
  • Palm 8.5(b) will require you to run a loop that changes b based on differing values of c. You will also need to pull specific values out of the solution to the linear algebra problem - which will be a 3x1 matrix containing the \(x\), \(y\), and \(z\) values for a particular c - and store them in the right location within the x, y, and z vectors.
  • The fifth problem is similar to the first three, although you have to come up with equations.
  • The sixth problem starts by having you solve a specific case and then asks you to write a function for particular cases. Note that you will have two if trees - one based on the number of input arguments given and one based on the condition number of the system. You can use any condition number you like; typically the condition number based on the 2 norm is used.