Home
Quiz 1
Quiz 2
Quiz 3
Quiz 4
Quiz 5
BuiltByNOF
OR481, Fall 1998: Quiz 2
  1. In Matlab, what does polyfit do? What does polyval do?
    polyfit computes the coefficients of a polynomial that approximates a data set; polyval evaluates a polynomial (but the polynomial need not come from polyfit)
  2. Suppose that you are given a data value C and wish to calculate an answer f(C). Let C = 3,000 and suppose that C is accurate to 4 significant digits. If the scaling factor for this calculation is 100, what is your prediction for the relative error in f(C)?
    (rel. error in f(C)) = (scaling factor)*(rel. error in C)
                                  = 100*.0001 = .01
  3. To approximate the value of a derivative f’(x) we used the formula f’(x) = [ f(x+e) - f(x) ] / e where e is some “small” number. What motivates us to choose e as small as possible?
    the small the value of e, the more accurately the formula approximates the derivative (in the mathematical sense)
  4. What motivates us not to choose e as small as possible?
    when we calculate this on the computer, and when e is very small, there is cancellation in the calculation, and if e is too small, the computational error will be large
[Home] [Quiz 1] [Quiz 2] [Quiz 3] [Quiz 4] [Quiz 5]