Minimizing a function(2 Variable) in MATLAB

290 Views Asked by At

I have a function $J(x_1,x_2)$ in MATLAB. I have found this function using a number of prior computations.For the computation I have use symbolic toolbox,hence is very dirty.(Not posting it here.)

Now, I am trying to find the value of $x_1$ and $x_2$ for which the function has its minimum.

I have used the following commands:

fun = @(x)(the function); 
x0 = [0,0];  % Random points to start
x = fminsearch(fun,x0)

But I am getting the following:

Exiting: Maximum number of function evaluations has been exceeded
     - increase MaxFunEvals option.
     Current function value: 0.000000 

x =

  1.0e+15 *

   1.2039    0.0000

I have searched for this and according to those:

Should I conclude that the function has no minima ?

Any hints please.

Thank You very much

Anupam