solving Wolfe function using matlab