comparison scripts/general/arrayfun.m @ 10821:693e22af08ae

Grammarcheck documentation of m-files Add newlines between @item fields for readability.
author Rik <octave@nomad.inbox5.com>
date Mon, 26 Jul 2010 21:25:36 -0700
parents a8ce6bdecce5
children a4f482e66b65
comparison
equal deleted inserted replaced
10820:c44c786f87ba 10821:693e22af08ae
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
42 ## argument then all input arguments must have the same sizes, for 42 ## argument then all input arguments must have the same sizes, for
43 ## example 43 ## example:
44 ## 44 ##
45 ## @example 45 ## @example
46 ## @group 46 ## @group
47 ## arrayfun (@@atan2, [1, 0], [0, 1]) 47 ## arrayfun (@@atan2, [1, 0], [0, 1])
48 ## @result{} ans = [1.5708 0.0000] 48 ## @result{} ans = [1.5708 0.0000]
52 ## If the parameter @var{val} after a further string input argument 52 ## If the parameter @var{val} after a further string input argument
53 ## "UniformOutput" is set @code{true} (the default), then the named 53 ## "UniformOutput" is set @code{true} (the default), then the named
54 ## function @var{func} must return a single element which then will be 54 ## function @var{func} must return a single element which then will be
55 ## concatenated into the return value and is of type matrix. Otherwise, 55 ## concatenated into the return value and is of type matrix. Otherwise,
56 ## if that parameter is set to @code{false}, then the outputs are 56 ## if that parameter is set to @code{false}, then the outputs are
57 ## concatenated in a cell array. For example 57 ## concatenated in a cell array. For example:
58 ## 58 ##
59 ## @example 59 ## @example
60 ## @group 60 ## @group
61 ## arrayfun (@@(x,y) x:y, "abc", "def", "UniformOutput", false) 61 ## arrayfun (@@(x,y) x:y, "abc", "def", "UniformOutput", false)
62 ## @result{} ans = 62 ## @result{} ans =
68 ## @end group 68 ## @end group
69 ## @end example 69 ## @end example
70 ## 70 ##
71 ## If more than one output arguments are given then the named function 71 ## If more than one output arguments are given then the named function
72 ## must return the number of return values that also are expected, for 72 ## must return the number of return values that also are expected, for
73 ## example 73 ## example:
74 ## 74 ##
75 ## @example 75 ## @example
76 ## @group 76 ## @group
77 ## [A, B, C] = arrayfun (@@find, [10; 0], "UniformOutput", false) 77 ## [A, B, C] = arrayfun (@@find, [10; 0], "UniformOutput", false)
78 ## @result{} 78 ## @result{}
109 ## the elements "identifier", "message" and "index", giving 109 ## the elements "identifier", "message" and "index", giving
110 ## respectively the error identifier, the error message and the index of 110 ## respectively the error identifier, the error message and the index of
111 ## the array elements that caused the error. The size of the output 111 ## the array elements that caused the error. The size of the output
112 ## argument of @var{errfunc} must have the same size as the output 112 ## argument of @var{errfunc} must have the same size as the output
113 ## argument of @var{func}, otherwise a real error is thrown. For 113 ## argument of @var{func}, otherwise a real error is thrown. For
114 ## example 114 ## example:
115 ## 115 ##
116 ## @example 116 ## @example
117 ## @group 117 ## @group
118 ## function y = ferr (s, x), y = "MyString"; endfunction 118 ## function y = ferr (s, x), y = "MyString"; endfunction
119 ## arrayfun (@@str2num, [1234], \ 119 ## arrayfun (@@str2num, [1234], \