From: Jorge B. <fic...@us...> - 2005-12-20 10:25:34
|
Update of /cvsroot/octave/octave-lang/base/octave/help In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17739 Added Files: cell2mat etreeplot regexp regexpi treeplot Log Message: added in octave.org-cvs --- NEW FILE: cell2mat --- -*- texinfo -*- @deftypefn {Function File} {@var{m} =} cell2mat (@var{c}) Convert the cell array @var{c} into a matrix by concatenating all elements of @var{c} into a hyperrectangle. Elements of @var{c} must be numeric, logical or char, and @code{cat} must be able to concatenate them together. @end deftypefn @seealso{mat2cell, num2cell} --- NEW FILE: regexp --- -*- texinfo -*- @deftypefn {Loadable Function} {[@var{s}, @var{e}, @var{te}, @var{m}, @var{t}, @var{nm}] =} regexp (@var{str}, @var{pat}) @deftypefnx {Loadable Function} {[@dots{}] =} regexp (@var{str}, @var{pat}, @var{opts}, @dots{}) Regular expression string matching. Matches @var{pat} in @var{str} and returns the position and matching substrings or empty values if there are none. The matched pattern @var{pat} can include any of the standard regex operators, including: @table @code @item . Match any character @item * + ? @{@} Repetition operators, representing @table @code @item * Match zero or more times @item + Match one or more times @item ? Match zero or one times @item @{@} Match range operator, which is of the form @code{@{@var{n}@}} to match exactly @var{n} times, @code{@{@var{m},@}} to match @var{m} or more times, @code{@{@var{m},@var{n}@}} to match between @var{m} and @var{n} times. @end table @item [@dots{}] [^@dots{}] List operators, where for example @code{[ab]c} matches @code{ac} and @code{bc} @item () Grouping operator @item | Alternation operator. Match one of a choice of regular expressions. The alternatives must be delimited by the grouoing operator @code{()} above @item ^ $ Anchoring operator. @code{^} matches the start of the string @var{str} and @code{$} the end @end table In addition the following escaped characters have special meaning. It should be noted that it is recommended to quote @var{pat} in single quotes rather than double quotes, to avoid the escape sequences being interpreted by octave before being passed to @code{regexp}. @table @code @item \b Match a word boundary @item \B Match within a word @item \w Matches any word character @item \W Matches any non word character @item \< Matches the beginning of a word @item \> Matches the end of a word @item \s Matches any whitespace character @item \S Matches any non whitespace character @item \d Matches any digit @item \D Matches any non-digit @end table The outputs of @code{regexp} by default are in the order as given below @table @asis @item @var{s} The start indices of each of the matching substrings @item @var{e} The end indices of each matching substring @item @var{te} The extents of each of the matched token surrounded by @code{(@dots{})} in @var{pat}. @item @var{m} A cell array of the text of each match. @item @var{t} A cell array of the text of each token matched. @item @var{nm} A structure containing the text of each matched named token, with the name being used as the fieldname. A named token is denoted as @code{(?<name>@dots{})} @end table Particular output arguments or the order of the output arguments can be selected by additional @var{opts} arguments. These are strings and the correspondence between the output arguments and the optional argument are @multitable @columnfractions 0.2 0.3 0.3 0.2 @item @tab 'start' @tab @var{s} @tab @item @tab 'end' @tab @var{e} @tab @item @tab 'tokenExtents' @tab @var{te} @tab @item @tab 'match' @tab @var{m} @tab @item @tab 'tokens' @tab @var{t} @tab @item @tab 'names' @tab @var{nm} @tab @end multitable A further optional argument is 'once', that limits the number of returned matches to the first match. @end deftypefn --- NEW FILE: regexpi --- -*- texinfo -*- @deftypefn {Loadable Function} {[@var{s}, @var{e}, @var{te}, @var{m}, @var{t}, @var{nm}] =} regexpi (@var{str}, @var{pat}) @deftypefnx {Loadable Function} {[@dots{}] =} regexpi (@var{str}, @var{pat}, @var{opts}, @dots{}) Case insensitive regular expression string matching. Matches @var{pat} in @var{str} and returns the position and matching substrings or empty values if there are none. See @code{regexp} for more details @end deftypefn --- NEW FILE: treeplot --- -*- texinfo -*- @deftypefn {Function File} {} treeplot (@var{Tree}) @deftypefnx {Function File} {} treeplot (@var{Tree}, @var{LineStyle}, @var{EdgeStyle}) Produces a graph of tree or forest. The first argument is vector of predecessors, optional parametres @var{LineStyle} and @var{EdgeStyle} define the output style. The complexity of the algorithm is O(n) in terms of is time and memory requirements. @end deftypefn @seealso{etreeplot,gplot} --- NEW FILE: etreeplot --- -*- texinfo -*- @deftypefn {Function File} {} etreeplot (@var{tree}) @deftypefnx {Function File} {} etreeplot (@var{tree}, @var{node_style}, @var{edge_style}) Plot the elimination tree of the matrix @var{s} or @code{@var{s}+@var{s}'} if @var{s} in non-symmetric. The optional parameters @var{line_style} and @var{edge_style} define the output style. @end deftypefn @seealso{treeplot,gplot} |