Matlab Code For Newtons Method