Mercurial > octave-nkf
comparison scripts/miscellaneous/parseparams.m @ 5996:bd0507994409
[project @ 2006-09-22 19:38:52 by dbateman]
author | dbateman |
---|---|
date | Fri, 22 Sep 2006 19:38:53 +0000 |
parents | dadcfe8b7ba4 |
children | 49dfdb54bb2b |
comparison
equal
deleted
inserted
replaced
5995:9223672bd578 | 5996:bd0507994409 |
---|---|
16 ## along with Octave; see the file COPYING. If not, write to the Free | 16 ## along with Octave; see the file COPYING. If not, write to the Free |
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | 17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
18 ## 02110-1301, USA. | 18 ## 02110-1301, USA. |
19 | 19 |
20 ## -*- texinfo -*- | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function File} {} [@var{reg}, @var{prop}] = parseparams (@var{params}) | 21 ## @deftypefn {Function File} {[@var{reg}, @var{prop}] =} parseparams (@var{params}) |
22 ## Return in @var{reg} the cell elements of @var{param} up to the first | 22 ## Return in @var{reg} the cell elements of @var{param} up to the first |
23 ## string element and in @var{prop} all remaining elements beginning | 23 ## string element and in @var{prop} all remaining elements beginning |
24 ## with the first string element. For example | 24 ## with the first string element. For example |
25 ## | 25 ## |
26 ## @example | 26 ## @example |
27 ## @group | |
27 ## [reg, prop] = parseparams (@{1, 2, "linewidth", 10@}) | 28 ## [reg, prop] = parseparams (@{1, 2, "linewidth", 10@}) |
28 ## reg = | 29 ## reg = |
29 ## { | 30 ## @{ |
30 ## [1,1] = 1 | 31 ## [1,1] = 1 |
31 ## [1,2] = 2 | 32 ## [1,2] = 2 |
32 ## } | 33 ## @} |
33 ## prop = | 34 ## prop = |
34 ## { | 35 ## @{ |
35 ## [1,1] = linewidth | 36 ## [1,1] = linewidth |
36 ## [1,2] = 10 | 37 ## [1,2] = 10 |
37 ## } | 38 ## @} |
39 ## @end group | |
38 ## @end example | 40 ## @end example |
39 ## | 41 ## |
40 ## The parseparams function may be used to separate "regular" | 42 ## The parseparams function may be used to separate 'regular' |
41 ## arguments and additional arguments given as property/value pairs of | 43 ## arguments and additional arguments given as property/value pairs of |
42 ## the @var{varargin} cell array. | 44 ## the @var{varargin} cell array. |
43 ## @seealso{varargin} | 45 ## @seealso{varargin} |
44 ## @end deftypefn | 46 ## @end deftypefn |
45 | 47 |