Newton Raphson Method Matlab Stack Overflow