CSC 210

Week 9


Topics:


Assignment:

  1. Online course survey: Please fill out the online survey for our course so we can make it a better one in the future. Thanks. SURVEY LINK

  2. Modify the newtonFor.R file above so that newtonForSqrtA = function(A, x, final) computes the square root of A, with a starting value of x, and final number of iterates.

  3. Write a function eulerPendulum=function(g, L, x1, x2, h, steps) to compute the solution of the pedulum without friction with g=gravitational constant, L=length, x1=initial position, x2=initial velocity, h=step size, steps=numer of Euler steps. Now, use your function to compute eulerPendulum(1, 1, 0, 1.1, 0.1, 5). Validate your numbers against the ones you obtain from PHASER.

  4. Heating of a probe: A student held a temperature probe between her two fingers and recorded the following temperatures every 2 seconds:
    Time     Temp
        00     32.78
        02     33.12
        04     33.37
        06     33.54
        08     33.68
        10     33.78
        12     33.85
        14     33.93
        16     33.98
        18     34.03
        20     34.05