# HG changeset patch # User jwe # Date 857185957 0 # Node ID ee9582e6668f29213d70bf539e766c4b32eac876 # Parent c05ed7ef4c1a510d6ccbae2199eed20d53183119 [project @ 1997-03-01 03:12:36 by jwe] diff --git a/doc/interpreter/arith.texi b/doc/interpreter/arith.texi --- a/doc/interpreter/arith.texi +++ b/doc/interpreter/arith.texi @@ -416,7 +416,7 @@ @section Special Functions @deftypefn {Mapping Function} {} beta (@var{a}, @var{b}) -Returns the Beta function, +Return the Beta function, @iftex @tex $$ @@ -433,7 +433,7 @@ @end deftypefn @deftypefn {Mapping Function} {} betai (@var{a}, @var{b}, @var{x}) -Returns the incomplete Beta function, +Return the incomplete Beta function, @iftex @tex $$ @@ -458,7 +458,7 @@ @end deftypefn @deftypefn {Mapping Function} {} bincoeff (@var{n}, @var{k}) -Returns the binomial coefficient of @var{n} and @var{k}, defined as +Return the binomial coefficient of @var{n} and @var{k}, defined as @iftex @tex $$ @@ -576,7 +576,7 @@ @deftypefn {Mapping Function} {} lgamma (@var{a}, @var{x}) @deftypefnx {Mapping Function} {} gammaln (@var{a}, @var{x}) -Returns the natural logarithm of the gamma function. +Return the natural logarithm of the gamma function. @end deftypefn @deftypefn {Function File} {} cross (@var{x}, @var{y}) @@ -592,7 +592,7 @@ @end deftypefn @deftypefn {Function File} {} commutation_matrix (@var{m}, @var{n}) -Returns the commutation matrix +Return the commutation matrix @iftex @tex $K_{m,n}$ @@ -654,7 +654,7 @@ @end deftypefn @deftypefn {Function File} {} duplication_matrix (@var{n}) -Returns the duplication matrix +Return the duplication matrix @iftex @tex $D_n$ diff --git a/doc/interpreter/io.texi b/doc/interpreter/io.texi --- a/doc/interpreter/io.texi +++ b/doc/interpreter/io.texi @@ -1443,14 +1443,14 @@ @subsection End of File and Errors @deftypefn {Built-in Function} {} feof (@var{fid}) -Returns 1 if an end-of-file condition has been encountered for a given +Return 1 if an end-of-file condition has been encountered for a given file and 0 otherwise. Note that it will only return 1 if the end of the file has already been encountered, not if the next read operation will result in an end-of-file condition. @end deftypefn @deftypefn {Built-in Function} {} ferror (@var{fid}) -Returns 1 if an error condition has been encountered for a given file +Return 1 if an error condition has been encountered for a given file and 0 otherwise. Note that it will only return 1 if an error has already been encountered, not if the next operation will result in an error condition. diff --git a/doc/interpreter/linalg.texi b/doc/interpreter/linalg.texi --- a/doc/interpreter/linalg.texi +++ b/doc/interpreter/linalg.texi @@ -154,7 +154,7 @@ @end deftypefn @deftypefn {Function File} {} null (@var{a}, @var{tol}) -Returns an orthonormal basis of the null space of @var{a}. +Return an orthonormal basis of the null space of @var{a}. The dimension of the null space is taken as the number of singular values of @var{a} not greater than @var{tol}. If the argument @var{tol} @@ -166,7 +166,7 @@ @end deftypefn @deftypefn {Function File} {} orth (@var{a}, @var{tol}) -Returns an orthonormal basis of the range space of @var{a}. +Return an orthonormal basis of the range space of @var{a}. The dimension of the range space is taken as the number of singular values of @var{a} greater than @var{tol}. If the argument @var{tol} is @@ -178,7 +178,7 @@ @end deftypefn @deftypefn {Function File} {} pinv (@var{x}, @var{tol}) -Returns the pseudoinverse of @var{x}. Singular values less than +Return the pseudoinverse of @var{x}. Singular values less than @var{tol} are ignored. If the second argument is omitted, it is assumed that @@ -671,8 +671,8 @@ @section Functions of a Matrix @deftypefn {Loadable Function} {} expm (@var{a}) -Returns the exponential of a matrix, defined as the -infinite Taylor series +Return the exponential of a matrix, defined as the infinite Taylor +series @iftex @tex $$ diff --git a/doc/interpreter/matrix.texi b/doc/interpreter/matrix.texi --- a/doc/interpreter/matrix.texi +++ b/doc/interpreter/matrix.texi @@ -161,10 +161,10 @@ @end deftypefn @deftypefn {Loadable Function} {} find (@var{x}) -The function @code{find} returns a vector of indices of nonzero elements -of a matrix. To obtain a single index for each matrix element, Octave -pretends that the columns of a matrix form one long vector (like Fortran -arrays are stored). For example, +Return a vector of indices of nonzero elements of a matrix. To obtain a +single index for each matrix element, Octave pretends that the columns +of a matrix form one long vector (like Fortran arrays are stored). For +example, @example @group @@ -235,7 +235,7 @@ @end deftypefn @deftypefn {Function File} {} rot90 (@var{x}, @var{n}) -Returns a copy of @var{x} with the elements rotated counterclockwise in +Return a copy of @var{x} with the elements rotated counterclockwise in 90-degree increments. The second argument is optional, and specifies how many 90-degree rotations are to be applied (the default value is 1). Negative values of @var{n} rotate the matrix in a clockwise direction. @@ -306,7 +306,7 @@ @end deftypefn @deftypefn {Loadable Function} {[@var{s}, @var{i}] =} sort (@var{x}) -Returns a copy of @var{x} with the elements elements arranged in +Return a copy of @var{x} with the elements elements arranged in increasing order. For matrices, @code{sort} orders the elements in each column. @@ -409,14 +409,14 @@ @end deftypefn @deftypefn {Function File} {} vec (@var{x}) -For a matrix @var{x}, returns the vector obtained by stacking the -columns of @var{x} one above the other. +Return the vector obtained by stacking the columns of the matrix @var{x} +one above the other. @end deftypefn @deftypefn {Function File} {} vech (@var{x}) -For a square matrix @var{x}, returns the vector obtained from @var{x} -by eliminating all supradiagonal elements and stacking the result -one column above the other. +Return the vector obtained by eliminating all supradiagonal elements of +the square matrix @var{x} and stacking the result one column above the +other. @end deftypefn @node Special Utility Matrices, Famous Matrices, Rearranging Matrices, Matrix Manipulation @@ -424,7 +424,7 @@ @deftypefn {Built-in Function} {} eye (@var{x}) @deftypefnx {Built-in Function} {} eye (@var{n}, @var{m}) -Returns an identity matrix. If invoked with a single scalar argument, +Return an identity matrix. If invoked with a single scalar argument, @code{eye} returns a square matrix with the dimension specified. If you supply two scalar arguments, @code{eye} takes them to be the number of rows and columns. If given a vector with two elements, @code{eye} uses @@ -459,7 +459,7 @@ @deftypefn {Built-in Function} {} ones (@var{x}) @deftypefnx {Built-in Function} {} ones (@var{n}, @var{m}) -Returns a matrix whose elements are all 1. The arguments are handled +Return a matrix whose elements are all 1. The arguments are handled the same as the arguments for @code{eye}. If you need to create a matrix whose values are all the same, you should @@ -472,14 +472,14 @@ @deftypefn {Built-in Function} {} zeros (@var{x}) @deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m}) -Returns a matrix whose elements are all 0. The arguments are handled +Return a matrix whose elements are all 0. The arguments are handled the same as the arguments for @code{eye}. @end deftypefn @deftypefn {Loadable Function} {} rand (@var{x}) @deftypefnx {Loadable Function} {} rand (@var{n}, @var{m}) @deftypefnx {Loadable Function} {} rand (@code{"seed"}, @var{x}) -Returns a matrix with random elements uniformly distributed on the +Return a matrix with random elements uniformly distributed on the interval (0, 1). The arguments are handled the same as the arguments for @code{eye}. In addition, you can set the seed for the random number generator using the @@ -503,7 +503,7 @@ @deftypefn {Loadable Function} {} randn (@var{x}) @deftypefnx {Loadable Function} {} randn (@var{n}, @var{m}) @deftypefnx {Loadable Function} {} randn (@code{"seed"}, @var{x}) -Returns a matrix with normally distributed random elements. The +Return a matrix with normally distributed random elements. The arguments are handled the same as the arguments for @code{eye}. In addition, you can set the seed for the random number generator using the form @@ -570,7 +570,7 @@ Houston, TX 77030. @deftypefn {Built-in Function} {} diag (@var{v}, @var{k}) -Returns a diagonal matrix with vector @var{v} on diagonal @var{k}. The +Return a diagonal matrix with vector @var{v} on diagonal @var{k}. The second argument is optional. If it is positive, the vector is placed on the @var{k}-th super-diagonal. If it is negative, it is placed on the @var{-k}-th sub-diagonal. The default value of @var{k} is 0, and the diff --git a/doc/interpreter/poly.texi b/doc/interpreter/poly.texi --- a/doc/interpreter/poly.texi +++ b/doc/interpreter/poly.texi @@ -101,12 +101,12 @@ @end deftypefn @deftypefn {Function File} {} polyderiv (@var{c}) -Returns the coefficients of the derivative of the polynomial whose +Return the coefficients of the derivative of the polynomial whose coefficients are given by vector @var{c}. @end deftypefn @deftypefn {Function File} {} polyfit (@var{n}, @var{y}, @var{n}) -Returns the coefficients of a polynomial @var{p}(@var{x}) of degree +Return the coefficients of a polynomial @var{p}(@var{x}) of degree @var{n} that minimizes @iftex @tex @@ -122,7 +122,7 @@ @end deftypefn @deftypefn {Function File} {} polyinteg (@var{c}) -Returns the coefficients of the integral the polynomial whose coefficients +Return the coefficients of the integral the polynomial whose coefficients are represented by the vector @var{c}. The constant of integration is set to zero. diff --git a/doc/interpreter/set.texi b/doc/interpreter/set.texi --- a/doc/interpreter/set.texi +++ b/doc/interpreter/set.texi @@ -9,9 +9,8 @@ set is defined as a collection unique elements. @deftypefn {Function File} {} create_set (@var{x}) -Given a matrix or vector of values, the function @code{create_set} -returns a row vector containing unique values, sorted in ascending -order. For example, +Return a row vector containing the unique values in @var{x}, sorted in +ascending order. For example, @example @group @@ -46,7 +45,7 @@ @end deftypefn @deftypefn {Function File} {} complement (@var{x}, @var{y}) -Returns the elements of set @var{y} that are not in set @var{x}. For +Return the elements of set @var{y} that are not in set @var{x}. For example, @example diff --git a/doc/interpreter/signal.texi b/doc/interpreter/signal.texi --- a/doc/interpreter/signal.texi +++ b/doc/interpreter/signal.texi @@ -62,11 +62,10 @@ @end deftypefn @deftypefn {Built-in Function} {} fftconv (@var{a}, @var{b}, @var{n}) -This function returns the convolution of the vectors @var{a} and -@var{b}, a vector with length equal to the @code{length (a) + length (b) -- 1}. If @var{a} and @var{b} are the coefficient vectors of two -polynomials, the returned value is the coefficient vector of the product -polynomial. +Return the convolution of the vectors @var{a} and @var{b}, as a vector +with length equal to the @code{length (a) + length (b) - 1}. If @var{a} +and @var{b} are the coefficient vectors of two polynomials, the returned +value is the coefficient vector of the product polynomial. The computation uses the FFT by calling the function @code{fftfilt}. If the optional argument @var{n} is specified, an N-point FFT is used. @@ -82,8 +81,8 @@ @end deftypefn @deftypefn {Loadable Function} {y =} filter (@var{b}, @var{a}, @var{x}) -This function returns the solution to the following linear, -time-invariant difference equation: +Return the solution to the following linear, time-invariant difference +equation: @iftex @tex $$ diff --git a/doc/interpreter/special.texi b/doc/interpreter/special.texi --- a/doc/interpreter/special.texi +++ b/doc/interpreter/special.texi @@ -19,7 +19,7 @@ @deftypefn {Built-in Function} {} eye (@var{x}) @deftypefnx {Built-in Function} {} eye (@var{n}, @var{m}) -Returns an identity matrix. If invoked with a single scalar argument, +Return an identity matrix. If invoked with a single scalar argument, @code{eye} returns a square matrix with the dimension specified. If you supply two scalar arguments, @code{eye} takes them to be the number of rows and columns. If given a vector with two elements, @code{eye} uses @@ -54,7 +54,7 @@ @deftypefn {Built-in Function} {} ones (@var{x}) @deftypefnx {Built-in Function} {} ones (@var{n}, @var{m}) -Returns a matrix whose elements are all 1. The arguments are handled +Return a matrix whose elements are all 1. The arguments are handled the same as the arguments for @code{eye}. If you need to create a matrix whose values are all the same, you should @@ -67,14 +67,14 @@ @deftypefn {Built-in Function} {} zeros (@var{x}) @deftypefnx {Built-in Function} {} zeros (@var{n}, @var{m}) -Returns a matrix whose elements are all 0. The arguments are handled +Return a matrix whose elements are all 0. The arguments are handled the same as the arguments for @code{eye}. @end deftypefn @deftypefn {Loadable Function} {} rand (@var{x}) @deftypefnx {Loadable Function} {} rand (@var{n}, @var{m}) @deftypefnx {Loadable Function} {} rand (@code{"seed"}, @var{x}) -Returns a matrix with random elements uniformly distributed on the +Return a matrix with random elements uniformly distributed on the interval (0, 1). The arguments are handled the same as the arguments for @code{eye}. In addition, you can set the seed for the random number generator using the @@ -98,7 +98,7 @@ @deftypefn {Loadable Function} {} randn (@var{x}) @deftypefnx {Loadable Function} {} randn (@var{n}, @var{m}) @deftypefnx {Loadable Function} {} randn (@code{"seed"}, @var{x}) -Returns a matrix with normally distributed random elements. The +Return a matrix with normally distributed random elements. The arguments are handled the same as the arguments for @code{eye}. In addition, you can set the seed for the random number generator using the form @@ -164,7 +164,7 @@ The University of Texas, M.D. Anderson Cancer Center, Houston, TX 77030. @deftypefn {Built-in Function} {} diag (@var{v}, @var{k}) -Returns a diagonal matrix with vector @var{v} on diagonal @var{k}. The +Return a diagonal matrix with vector @var{v} on diagonal @var{k}. The second argument is optional. If it is positive, the vector is placed on the @var{k}-th super-diagonal. If it is negative, it is placed on the @var{-k}-th sub-diagonal. The default value of @var{k} is 0, and the diff --git a/doc/interpreter/stats.texi b/doc/interpreter/stats.texi --- a/doc/interpreter/stats.texi +++ b/doc/interpreter/stats.texi @@ -112,9 +112,10 @@ @end deftypefn @deftypefn {Function File} {} mahalanobis (@var{x}, @var{y}) -Returns Mahalanobis' D-square distance between the multivariate samples -@var{x} and @var{y}, which must have the same number of components -(columns), but may have a different number of observations (rows). +Return the Mahalanobis' D-square distance between the multivariate +samples @var{x} and @var{y}, which must have the same number of +components (columns), but may have a different number of observations +(rows). @end deftypefn @deftypefn {Function File} {} skewness (@var{x}) diff --git a/doc/interpreter/strings.texi b/doc/interpreter/strings.texi --- a/doc/interpreter/strings.texi +++ b/doc/interpreter/strings.texi @@ -123,7 +123,7 @@ @section Creating Strings @deftypefn {Function File} {} blanks (@var{n}) -Returns a string of @var{n} blanks. +Return a string of @var{n} blanks. @end deftypefn @deftypefn {Function File} {} int2str (@var{n}) @@ -177,7 +177,7 @@ @end defvr @deftypefn {Function File} {} str2mat (@var{s_1}, @dots{}, @var{s_n}) -Returns a matrix containing the strings @var{s_1}, @dots{}, @var{s_n} as +Return a matrix containing the strings @var{s_1}, @dots{}, @var{s_n} as its rows. Each string is padded with blanks in order to form a valid matrix. @@ -199,7 +199,7 @@ @end deftypefn @deftypefn {Function File} {} findstr (@var{s}, @var{t}, @var{overlap}) -Returns the vector of all positions in the longer of the two strings +Return the vector of all positions in the longer of the two strings @var{s} and @var{t} where an occurrence of the shorter of the two starts. If the optional argument @var{overlap} is nonzero, the returned vector can include overlapping positions (this is the default). For example, @@ -213,7 +213,7 @@ @end deftypefn @deftypefn {Function File} {} index (@var{s}, @var{t}) -Returns the position of the first occurrence of the string @var{t} in the +Return the position of the first occurrence of the string @var{t} in the string @var{s}, or 0 if no occurrence is found. For example, @example @@ -225,7 +225,7 @@ @end deftypefn @deftypefn {Function File} {} rindex (@var{s}, @var{t}) -Returns the position of the last occurrence of the string @var{t} in the +Return the position of the last occurrence of the string @var{t} in the string @var{s}, or 0 if no occurrence is found. For example, @example @@ -268,7 +268,7 @@ @end deftypefn @deftypefn {Function File} {} substr (@var{s}, @var{beg}, @var{len}) -Returns the substring of @var{s} which starts at character number +Return the substring of @var{s} which starts at character number @var{beg} and is @var{len} characters long. For example, @example @@ -287,8 +287,8 @@ @section String Conversions @deftypefn {Function File} {} bin2dec (@var{s}) -Given a binary number represented as a string of zeros and ones, -returns the corresponding decimal number. For example, +Return a decimal number corresponding to the the binary number +represented as a string of zeros and ones. For example, @example bin2dec ("1110") @@ -297,8 +297,8 @@ @end deftypefn @deftypefn {Function File} {} dec2bin (@var{n}) -Given a nonnegative integer, returns the corresponding binary number as -a string of ones and zeros. For example, +Return a binary number corresponding the the nonnegative decimal number +@var{n}, as a string of ones and zeros. For example, @example dec2bin (14) @@ -307,8 +307,8 @@ @end deftypefn @deftypefn {Function File} {} dec2hex (@var{n}) -Given a nonnegative integer, returns the corresponding hexadecimal -number as a string. For example, +Return the hexadecimal number corresponding to the nonnegative decimal +number @var{n}, as a string. For example, @example dec2hex (2748) @@ -317,8 +317,8 @@ @end deftypefn @deftypefn {Function File} {} hex2dec (@var{s}) -Given a hexadecimal number represented as a string, returns the -corresponding decimal number. For example, +Return the decimal number corresponding to the hexadecimal number stored +in the string @var{s}. For example, @example hex2dec ("12B") @@ -356,7 +356,7 @@ @end deftypefn @deftypefn {Function File} {} toupper (@var{s}) -Returns a copy of the string @var{s}, with each lower-case character +Return a copy of the string @var{s}, with each lower-case character replaced by the corresponding upper-case one; nonalphabetic characters are left unchanged. For example, @@ -418,52 +418,52 @@ @end example @deftypefn {Mapping Function} {} isalnum (@var{s}) -Returns true for characters that are letters or digits (@code{isalpha +Return 1 for characters that are letters or digits (@code{isalpha (@var{a})} or @code{isdigit (@var{})} is true). @end deftypefn @deftypefn {Mapping Function} {} isalpha (@var{s}) -Returns true for characters that are letters (@code{isupper (@var{a})} +Return true for characters that are letters (@code{isupper (@var{a})} or @code{islower (@var{})} is true). @end deftypefn @deftypefn {Mapping Function} {} isascii (@var{s}) -Returns true for characters that are ASCII (in the range 0 to 127 decimal). +Return 1 for characters that are ASCII (in the range 0 to 127 decimal). @end deftypefn @deftypefn {Mapping Function} {} iscntrl (@var{s}) -Returns true for control characters. +Return 1 for control characters. @end deftypefn @deftypefn {Mapping Function} {} isdigit (@var{s}) -Returns true for characters that are decimal digits. +Return 1 for characters that are decimal digits. @end deftypefn @deftypefn {Mapping Function} {} isgraph (@var{s}) -Returns true for printable characters (but not the space character). +Return 1 for printable characters (but not the space character). @end deftypefn @deftypefn {Mapping Function} {} islower (@var{s}) -Returns true for characters that are lower case letters. +Return 1 for characters that are lower case letters. @end deftypefn @deftypefn {Mapping Function} {} isprint (@var{s}) -Returns true for printable characters (including the space character). +Return 1 for printable characters (including the space character). @end deftypefn @deftypefn {Mapping Function} {} ispunct (@var{s}) -Returns true for punctuation characters. +Return 1 for punctuation characters. @end deftypefn @deftypefn {Mapping Function} {} isspace (@var{s}) -Returns true for whitespace characters (space, formfeed, newline, +Return 1 for whitespace characters (space, formfeed, newline, carriage return, tab, and vertical tab). @end deftypefn @deftypefn {Mapping Function} {} isupper (@var{s}) -Returns true for upper case letters. +Return 1 for upper case letters. @end deftypefn @deftypefn {Mapping Function} {} isxdigit (@var{s}) -Returns true for characters that are hexadecimal digits. +Return 1 for characters that are hexadecimal digits. @end deftypefn diff --git a/doc/interpreter/struct.texi b/doc/interpreter/struct.texi --- a/doc/interpreter/struct.texi +++ b/doc/interpreter/struct.texi @@ -185,17 +185,17 @@ structures. @deftypefn {Built-in Function} {} is_struct (@var{expr}) -Returns 1 if the value of the expression @var{expr} is a structure. +Return 1 if the value of the expression @var{expr} is a structure. @end deftypefn @deftypefn {Built-in Function} {} struct_contains (@var{expr}, @var{name}) -This function returns 1 if the expression @var{expr} is a structure and it -includes an element named @var{name}. The first argument must be a -structure and the second must be a string. +Return 1 if the expression @var{expr} is a structure and it includes an +element named @var{name}. The first argument must be a structure and +the second must be a string. @end deftypefn -@deftypefn {Built-in Function} {} struct_elements (@var{expr}) -If the expression @var{expr} is a structure, this function returns a -list of strings naming the elements of the structure. It is an error to -call @code{struct_elements} with an argument that is not a structure. +@deftypefn {Built-in Function} {} struct_elements (@var{struct}) +Return a list of strings naming the elements of the structure @{struct}. +It is an error to call @code{struct_elements} with an argument that is +not a structure. @end deftypefn diff --git a/doc/interpreter/system.texi b/doc/interpreter/system.texi --- a/doc/interpreter/system.texi +++ b/doc/interpreter/system.texi @@ -336,7 +336,7 @@ @end deftypefn @deftypefn {Function File} {} date () -Returns the date as a character string in the form DD-MMM-YY. For +Return the date as a character string in the form DD-MMM-YY. For example, @example @@ -992,7 +992,7 @@ @section Environment Variables @deftypefn {Built-in Function} {} getenv (@var{var}) -Returns the value of the environment variable @var{var}. For example, +Return the value of the environment variable @var{var}. For example, @example getenv ("PATH") @@ -1024,7 +1024,7 @@ @end deffn @deftypefn {Built-in Function} {} pwd () -Returns the current working directory. +Return the current working directory. @end deftypefn @defvr {Built-in Variable} PWD @@ -1181,7 +1181,7 @@ @end deftypefn @deftypefn {Built-in Function} {} version () -Returns Octave's version number as a string. This is also the value of +Return Octave's version number as a string. This is also the value of the built-in variable @code{OCTAVE_VERSION}. @end deftypefn