
4 Programming
The graph
shows that the function has a local minimum near x =0.6. The
function
fminsearch finds the minimizer,thevalueofx where the function
takes on t
his minimum. The first argument to
fminsearch is a function
handle to
the function being minimized and the second argument is a rough
guess at
the location of the minimum:
p = fminsearch(@humps ,.5)
p=
0.6370
To evaluate the function at the minimizer,
humps(p)
ans =
11.2528
Numerical analysts use the terms quadrature and integration to disti nguish
between num erical approx imatio n of definite integrals and numerical
integration of ordinary differential equations. MATLAB quadrature routines
are
quad and quadl.Thestatement
4-30
Comentários a estes Manuais