newton.m Matlab code to solve a nonlinear equation by Newton's method
ed.m Matlab code to compute the excess demand function in problem 8-b of assignment 2.
(You could code its derivative easily and use the newton.m program above to solve for equilibrium, but in this case
I was a bit lazier and used ed.m with the Matlab fsolve program to find the equilibrium, starting from an initial guess of p=2.)