Mercurial > hg > octave-lyh
comparison scripts/general/gradient.m @ 9141:c1fff751b5a8
Update section 17.1 (Utility Functions) of arith.txi
Split section into "Exponents and Logarithms" and "Utility Functions"
Use Tex in many more of the doc strings for pretty printing in pdf format.
author | Rik <rdrider0-list@yahoo.com> |
---|---|
date | Mon, 20 Apr 2009 17:16:09 -0700 |
parents | 1bf0ce0930be |
children | 8c71a86c4bf4 |
comparison
equal
deleted
inserted
replaced
9140:c309e028185e | 9141:c1fff751b5a8 |
---|---|
23 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{m}, @var{x}, @var{y}, @var{z}, @dots{}) | 23 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{m}, @var{x}, @var{y}, @var{z}, @dots{}) |
24 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}) | 24 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}) |
25 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}, @var{s}) | 25 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}, @var{s}) |
26 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}, @var{x}, @var{y}, @dots{}) | 26 ## @deftypefnx {Function File} {[@dots{}] =} gradient (@var{f}, @var{x0}, @var{x}, @var{y}, @dots{}) |
27 ## | 27 ## |
28 ## Calculate the gradient of sampled data, or of a function. If @var{m} | 28 ## Calculate the gradient of sampled data or of a function. If @var{m} |
29 ## is a vector, calculate the one dimensional gradient of @var{m}. If | 29 ## is a vector, calculate the one dimensional gradient of @var{m}. If |
30 ## @var{m} is a matrix the gradient is calculated for each dimension. | 30 ## @var{m} is a matrix the gradient is calculated for each dimension. |
31 ## | 31 ## |
32 ## @code{[@var{dx}, @var{dy}] = gradient (@var{m})} calculates the one | 32 ## @code{[@var{dx}, @var{dy}] = gradient (@var{m})} calculates the one |
33 ## dimensional gradient for @var{x} and @var{y} direction if @var{m} is a | 33 ## dimensional gradient for @var{x} and @var{y} direction if @var{m} is a |
54 ## difference. For example, @code{gradient (@@cos, 0)} approximates the | 54 ## difference. For example, @code{gradient (@@cos, 0)} approximates the |
55 ## gradient of the cosine function in the point @math{x0 = 0}. As with | 55 ## gradient of the cosine function in the point @math{x0 = 0}. As with |
56 ## sampled data, the spacing values between the points from which the | 56 ## sampled data, the spacing values between the points from which the |
57 ## gradient is estimated can be set via the @var{s} or @var{dx}, | 57 ## gradient is estimated can be set via the @var{s} or @var{dx}, |
58 ## @var{dy}, @dots{} arguments. By default a spacing of 1 is used. | 58 ## @var{dy}, @dots{} arguments. By default a spacing of 1 is used. |
59 ## @seealso{diff, del2} | |
59 ## @end deftypefn | 60 ## @end deftypefn |
60 | 61 |
61 ## Author: Kai Habel <kai.habel@gmx.de> | 62 ## Author: Kai Habel <kai.habel@gmx.de> |
62 ## Modified: David Bateman <dbateman@free.fr> Added NDArray support | 63 ## Modified: David Bateman <dbateman@free.fr> Added NDArray support |
63 | 64 |