Mercurial > hg > octave-lyh
comparison scripts/general/arrayfun.m @ 11471:994e2a93a8e2
Use uppercase 'A' to refer to matrix inputs in m-files.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 09 Jan 2011 16:01:05 -0800 |
parents | a4f482e66b65 |
children | fd0a3ac60b0e |
comparison
equal
deleted
inserted
replaced
11470:eb9e0b597d61 | 11471:994e2a93a8e2 |
---|---|
16 ## You should have received a copy of the GNU General Public License | 16 ## You should have received a copy of the GNU General Public License |
17 ## along with Octave; see the file COPYING. If not, see | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | 18 ## <http://www.gnu.org/licenses/>. |
19 | 19 |
20 ## -*- texinfo -*- | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function File} {} arrayfun (@var{func}, @var{a}) | 21 ## @deftypefn {Function File} {} arrayfun (@var{func}, @var{A}) |
22 ## @deftypefnx {Function File} {@var{x} =} arrayfun (@var{func}, @var{a}) | 22 ## @deftypefnx {Function File} {@var{x} =} arrayfun (@var{func}, @var{A}) |
23 ## @deftypefnx {Function File} {@var{x} =} arrayfun (@var{func}, @var{a}, @var{b}, @dots{}) | 23 ## @deftypefnx {Function File} {@var{x} =} arrayfun (@var{func}, @var{A}, @var{b}, @dots{}) |
24 ## @deftypefnx {Function File} {[@var{x}, @var{y}, @dots{}] =} arrayfun (@var{func}, @var{a}, @dots{}) | 24 ## @deftypefnx {Function File} {[@var{x}, @var{y}, @dots{}] =} arrayfun (@var{func}, @var{A}, @dots{}) |
25 ## @deftypefnx {Function File} {} arrayfun (@dots{}, "UniformOutput", @var{val}) | 25 ## @deftypefnx {Function File} {} arrayfun (@dots{}, "UniformOutput", @var{val}) |
26 ## @deftypefnx {Function File} {} arrayfun (@dots{}, "ErrorHandler", @var{errfunc}) | 26 ## @deftypefnx {Function File} {} arrayfun (@dots{}, "ErrorHandler", @var{errfunc}) |
27 ## | 27 ## |
28 ## Execute a function on each element of an array. This is useful for | 28 ## Execute a function on each element of an array. This is useful for |
29 ## functions that do not accept array arguments. If the function does | 29 ## functions that do not accept array arguments. If the function does |
30 ## accept array arguments it is better to call the function directly. | 30 ## accept array arguments it is better to call the function directly. |
31 ## | 31 ## |
32 ## The first input argument @var{func} can be a string, a function | 32 ## The first input argument @var{func} can be a string, a function |
33 ## handle, an inline function or an anonymous function. The input | 33 ## handle, an inline function or an anonymous function. The input |
34 ## argument @var{a} can be a logic array, a numeric array, a string | 34 ## argument @var{A} can be a logic array, a numeric array, a string |
35 ## array, a structure array or a cell array. By a call of the function | 35 ## array, a structure array or a cell array. By a call of the function |
36 ## @command{arrayfun} all elements of @var{a} are passed on to the named | 36 ## @command{arrayfun} all elements of @var{A} are passed on to the named |
37 ## function @var{func} individually. | 37 ## function @var{func} individually. |
38 ## | 38 ## |
39 ## The named function can also take more than two input arguments, with | 39 ## The named function can also take more than two input arguments, with |
40 ## the input arguments given as third input argument @var{b}, fourth | 40 ## the input arguments given as third input argument @var{b}, fourth |
41 ## input argument @var{c}, @dots{} If given more than one array input | 41 ## input argument @var{c}, @dots{} If given more than one array input |