www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FindMinimumLocationAndFunctionValueExample.m

    %% Find Minimum Location and Function Value
% Find the location of the minimum of $\sin(x)$ and the value of the
% minimum for $0< x< 2\pi$.
fun = @sin;
[x,fval] = fminbnd(fun,1,2*pi)