fmins
Unconstrained minimization of a function of more than one variable by the Nelder-Mead method.
`(fm,xm)=fmins(optfunc,xin)`
`(fm,xm)=fmins(optfunc,xin,showit,maxstarts,tol,maxfeval)`
 Inputs `optfunc` The function to be minimized. See below. `xin` Initial estimate of the simplex enclosing the point at which the optimum occurs. `showit` Optional. If true, the progress of iterations is printed. Default value is false. `maxstarts` Optional. Maximum number of starting points to seek the minimum. The default value if 5. `maxfeval` Optional. Maximum number of function evaluations for each starting point. The default value if 200. `tol` Optional. Required accuracy of the solution. Defaults to `1.e-6.` Outputs `fm` The estimated minimum value. `xm` The estimated location of the minimum.

Description
The function `optfunc` should be of the form
`    f=optfunc(x)`
which returns, for the given input `x` , the value of the function.

If the gradient of the function can be easily computed, the function fminbfgs may be faster.

The second input should preferably be a set of points that form a simplex which encloses or is near the estimated minimum. (Note that in two dimensions, a simplex is a triangle, and in a space of higher dimensions, `n`, it is a convex hull of `n+1` affinely independent points.) The points should be specified as an `nX(n+1)` matrix.

Example
```
>>function func(x)
>>/*
>>*/
>>  y=x;x=x
>>   return x/4+5x^2+x^4-9x^2*y+3y^2+2y^4
>>end
>>xin=[0 .1 -.1;-.2 .1 .1];
>>[fm,xm]=fmins(\$func,xin,null,null,1.e-8)
>>printf("Estimated Minimum is %12.8f at the point [%12.8f %12.8f]\n",
fm,xm,xm);
Estimated Minimum is  -0.0031272525777023 at the point [ -0.0250360908189253   0.0009402078250463]

>>// Solve A*x=b for positive definite A by function minimization
>  var A, b
>     this.A=A;
>     this.b=b;
>  end
>  function (f)=()(x)
>     f=.5*(x'*A*x)-b'*x
>  end
>end
>>A=[2 3; 4 1],A=A*A', b=[3 4]'
>>