### Matlab Assignment 9

1. From what I understand the first step is to use Newton's Equations of Motion just the way we have been to find qdotdot and lambda at time t=0, so that we know everything about the system at that time.

2. Then we start incrementing time. At each time step our first guess for qdotdot and lambda is the value from the previous time step and we use these values to guess updated values of q and qdot based on Newmark's equations. Based on this guess of q, we evaluate J-tilde - a value we'll use/save for every iteration in this time step.

3.From here we can use the quasi-Newton method to get a more accurate value for qdotdot and lambda using

Psi=[M*qdotdot+[Phiq]T(current_guess_qn+1)-QA(qdot,q,t);

1/(Beta*h2)*Phi(current_guess_qn+1,t)]

4. Then we update our guesses for q and qdot, check the size of the correction factor and decide whether to go through the quais-Newton again to get better values for qdotdot and lambda (back to 3 if correction is still larger than specified limit).

5. Once we're satisfied with qdotdot and lambda, we save those values along with q and qdot computed from those values and then move on to the next time step and repeat the process starting at 2.