Examples
FUN can be specified using @:
X = fminsearch(@sin,3)
finds a minimum of the SIN function near 3.
In this case, SIN is a function that returns a scalar function value
SIN evaluated at X.
FUN can also be an inline object:
X = fminsearch(inline('norm(x)'),[1;2;3])
returns a minimum near [0;0;0].
给你两个例子。