%my function for fsolve demo function F = myfun(X) x=X(1); y=X(2); F(1) = x^2 + 2*y^2 - 3; F(2) = 5*x^2 + 6*x + 1 - y;