BUILT-IN MATHEMATICA SYMBOL

Gradient

Gradient
is an option for FindMinimum and related functions that specifies the gradient vector to assume for the function being extremized.

DetailsDetails

  • Gradient->{fx, fy, ...} specifies explicit components to assume for the gradient vector.
  • Gradient->Automatic specifies that the gradient vector should be deduced by exact or approximate differentiation of the function.
  • Gradient:>expr evaluates expr only with the specific numerical values of variables that are needed.

ExamplesExamplesopen allclose all

Basic Examples (1)Basic Examples (1)

Specify a numeric black-box function:

In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=

Specify a symbolic gradient to use:

In[3]:=
Click for copyable input
Out[3]=

Specify that second-order finite differences be used:

In[4]:=
Click for copyable input
Out[4]=

Give a monitor for evaluation of the gradient:

In[5]:=
Click for copyable input
Out[5]=
New in 2.2
New to Mathematica? Find your learning path »
Have a question? Ask support »