x0= [.1 1]; options=optimoptions('fsolve','Display','iter'); [x,fval] = fsolve(@myfun,x0,options)