Mercurial > emacs
changeset 104108:77ca9099315d
(Vector/Matrix Functions): Add index entries for both "v" and "V" key
bindings. Mention that `calc-matrix-brackets' only affects matrices
with more than one row.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Thu, 30 Jul 2009 04:37:51 +0000 |
parents | 6a6fc6d5dad8 |
children | 49ab4f14fed7 |
files | doc/misc/calc.texi |
diffstat | 1 files changed, 85 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/misc/calc.texi Wed Jul 29 16:03:12 2009 +0000 +++ b/doc/misc/calc.texi Thu Jul 30 04:37:51 2009 +0000 @@ -16553,6 +16553,7 @@ @mindex v p @end ignore @kindex v p (complex) +@kindex V p (complex) @pindex calc-pack The @kbd{v p} (@code{calc-pack}) command can pack the top two numbers on the stack into a composite object such as a complex number. With @@ -16564,6 +16565,7 @@ @mindex v u @end ignore @kindex v u (complex) +@kindex V u (complex) @pindex calc-unpack The @kbd{v u} (@code{calc-unpack}) command takes the complex number (or other composite object) on the top of the stack and unpacks it @@ -19365,6 +19367,7 @@ vectors. @kindex v p +@kindex V p @pindex calc-pack The @kbd{v p} (@code{calc-pack}) [@code{pack}] command collects several elements from the stack into a matrix, complex number, HMS form, error @@ -19497,6 +19500,7 @@ by the mode. @kindex v u +@kindex V u @pindex calc-unpack The @kbd{v u} (@code{calc-unpack}) command takes the vector, complex number, HMS form, or other composite object on the top of the stack and @@ -19614,6 +19618,7 @@ to @kbd{@key{TAB} |}, but possibly more convenient and also a bit faster. @kindex v d +@kindex V d @pindex calc-diag @tindex diag The @kbd{v d} (@code{calc-diag}) [@code{diag}] function builds a diagonal @@ -19632,6 +19637,7 @@ alternative would be to use @kbd{v b} and @kbd{v a}; see below.) @kindex v i +@kindex V i @pindex calc-ident @tindex idn The @kbd{v i} (@code{calc-ident}) [@code{idn}] function builds an identity @@ -19652,6 +19658,7 @@ dimensions. @kindex v x +@kindex V x @pindex calc-index @tindex index The @kbd{v x} (@code{calc-index}) [@code{index}] function builds a vector @@ -19676,6 +19683,7 @@ is one for positive @var{n} or two for negative @var{n}. @kindex v b +@kindex V b @pindex calc-build-vector @tindex cvec The @kbd{v b} (@code{calc-build-vector}) [@code{cvec}] function builds a @@ -19686,7 +19694,9 @@ to build a matrix of copies of that row.) @kindex v h +@kindex V h @kindex I v h +@kindex I V h @pindex calc-head @pindex calc-tail @tindex head @@ -19697,6 +19707,7 @@ cases, the argument must be a non-empty vector. @kindex v k +@kindex V k @pindex calc-cons @tindex cons The @kbd{v k} (@code{calc-cons}) [@code{cons}] function takes a value @var{h} @@ -19706,15 +19717,18 @@ whereas @code{cons} will insert @var{h} at the front of the vector @var{t}. @kindex H v h +@kindex H V h @tindex rhead @ignore @mindex @idots @end ignore @kindex H I v h +@kindex H I V h @ignore @mindex @null @end ignore @kindex H v k +@kindex H V k @ignore @mindex @null @end ignore @@ -19736,6 +19750,7 @@ @noindent @kindex v r +@kindex V r @pindex calc-mrow @tindex mrow The @kbd{v r} (@code{calc-mrow}) [@code{mrow}] command extracts one row of @@ -19786,6 +19801,7 @@ function is called @code{getdiag}. @kindex v c +@kindex V c @pindex calc-mcol @tindex mcol @tindex mrcol @@ -19803,6 +19819,7 @@ of matrix @expr{m}. @kindex v s +@kindex V s @pindex calc-subvector @tindex subvec The @kbd{v s} (@code{calc-subvector}) [@code{subvec}] command extracts @@ -19823,6 +19840,7 @@ has this effect when used as the ending index. @kindex I v s +@kindex I V s @tindex rsubvec With the Inverse flag, @kbd{I v s} [@code{rsubvec}] removes a subvector from a vector. The arguments are interpreted the same as for the @@ -19838,6 +19856,7 @@ @noindent @kindex v l +@kindex V l @pindex calc-vlength @tindex vlen The @kbd{v l} (@code{calc-vlength}) [@code{vlen}] command computes the @@ -19846,6 +19865,7 @@ command. @kindex H v l +@kindex H V l @tindex mdims With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector of the dimensions of a vector, matrix, or higher-order object. For @@ -19856,6 +19876,7 @@ matrix. @kindex v f +@kindex V f @pindex calc-vector-find @tindex find The @kbd{v f} (@code{calc-vector-find}) [@code{find}] command searches @@ -19866,6 +19887,7 @@ allows you to select any starting index for the search. @kindex v a +@kindex V a @pindex calc-arrange-vector @tindex arrange @cindex Arranging a matrix @@ -19896,7 +19918,9 @@ @samp{[1, 2, @w{3, 4}]}. @cindex Sorting data +@kindex v S @kindex V S +@kindex I v S @kindex I V S @pindex calc-sort @tindex sort @@ -19919,7 +19943,9 @@ @cindex Inverse of permutation @cindex Index tables @cindex Rank tables +@kindex v G @kindex V G +@kindex I v G @kindex I V G @pindex calc-grade @tindex grade @@ -19951,6 +19977,7 @@ phone numbers will remain sorted by name even after the second sort. @cindex Histograms +@kindex v H @kindex V H @pindex calc-histogram @ignore @@ -19968,6 +19995,7 @@ that the counts in the result vector don't add up to the length of the input vector.) +@kindex H v H @kindex H V H With the Hyperbolic flag, @kbd{H V H} pulls two vectors from the stack. The second-to-top vector is the list of numbers as before. The top @@ -19977,6 +20005,7 @@ vector. Without the hyperbolic flag, every element has a weight of one. @kindex v t +@kindex V t @pindex calc-transpose @tindex trn The @kbd{v t} (@code{calc-transpose}) [@code{trn}] command computes @@ -19985,6 +20014,7 @@ a one-column matrix. @kindex v v +@kindex V v @pindex calc-reverse-vector @tindex rev The @kbd{v v} (@code{calc-reverse-vector}) [@code{rev}] command reverses @@ -19994,6 +20024,7 @@ a matrix.) @kindex v m +@kindex V m @pindex calc-mask-vector @tindex vmask The @kbd{v m} (@code{calc-mask-vector}) [@code{vmask}] command uses @@ -20006,6 +20037,7 @@ @xref{Logical Operations}. @kindex v e +@kindex V e @pindex calc-expand-vector @tindex vexp The @kbd{v e} (@code{calc-expand-vector}) [@code{vexp}] command @@ -20019,6 +20051,7 @@ produces @samp{[a, 0, b, 0, 7]}. @kindex H v e +@kindex H V e With the Hyperbolic flag, @kbd{H v e} takes a filler value from the top of the stack; the mask and target vectors come from the third and second elements of the stack. This filler is used where the mask is @@ -20051,6 +20084,7 @@ @code{re}, @code{im}, @code{polar}, @code{rect}, @code{clean}, @code{float}, @code{frac}. @xref{Function Index}. +@kindex v J @kindex V J @pindex calc-conj-transpose @tindex ctrn @@ -20074,6 +20108,7 @@ from that point to the origin. @kindex v n +@kindex V n @pindex calc-rnorm @tindex rnorm The @kbd{v n} (@code{calc-rnorm}) [@code{rnorm}] command computes the @@ -20082,6 +20117,7 @@ a matrix, this is the maximum of the row-absolute-value-sums, i.e., of the sums of the absolute values of the elements along the various rows. +@kindex v N @kindex V N @pindex calc-cnorm @tindex cnorm @@ -20093,6 +20129,7 @@ not provided. However, the 2-norm (or Frobenius norm) is provided for vectors by the @kbd{A} (@code{calc-abs}) command. +@kindex v C @kindex V C @pindex calc-cross @tindex cross @@ -20121,12 +20158,14 @@ @samp{/} operator also does a matrix inversion when dividing one by a matrix. +@kindex v D @kindex V D @pindex calc-mdet @tindex det The @kbd{V D} (@code{calc-mdet}) [@code{det}] command computes the determinant of a square matrix. +@kindex v L @kindex V L @pindex calc-mlud @tindex lud @@ -20137,6 +20176,7 @@ algorithm, the second is lower-triangular with ones on the diagonal, and the third is upper-triangular. +@kindex v T @kindex V T @pindex calc-mtrace @tindex tr @@ -20144,6 +20184,7 @@ trace of a square matrix. This is defined as the sum of the diagonal elements of the matrix. +@kindex v K @kindex V K @pindex calc-kron @tindex kron @@ -20184,6 +20225,7 @@ a certain value is a member of a given set. To test if the set @expr{A} is a subset of the set @expr{B}, use @samp{vdiff(A, B) = []}. +@kindex v + @kindex V + @pindex calc-remove-duplicates @tindex rdup @@ -20196,6 +20238,7 @@ other set-based commands apply @kbd{V +} to their inputs before using them. +@kindex v V @kindex V V @pindex calc-set-union @tindex vunion @@ -20205,6 +20248,7 @@ accomplish the same thing by concatenating the sets with @kbd{|}, then using @kbd{V +}.) +@kindex v ^ @kindex V ^ @pindex calc-set-intersect @tindex vint @@ -20221,6 +20265,7 @@ @texline intersection@tie{}(@math{A \cap B}). @infoline intersection. +@kindex v - @kindex V - @pindex calc-set-difference @tindex vdiff @@ -20235,6 +20280,7 @@ your problem is small enough to list in a Calc vector (or simple enough to express in a few intervals). +@kindex v X @kindex V X @pindex calc-set-xor @tindex vxor @@ -20244,6 +20290,7 @@ if it is in one, but @emph{not} both, of the sets. Objects that occur in both sets ``cancel out.'' +@kindex v ~ @kindex V ~ @pindex calc-set-complement @tindex vcompl @@ -20253,6 +20300,7 @@ For example, @samp{vcompl([2, (3 .. 4]])} evaluates to @samp{[[-inf .. 2), (2 .. 3], (4 .. inf]]}. +@kindex v F @kindex V F @pindex calc-set-floor @tindex vfloor @@ -20265,6 +20313,7 @@ the complement with respect to the set of integers you could type @kbd{V ~ V F} to get @samp{[[-inf .. 1], [3 .. 5], [9 .. inf]]}. +@kindex v E @kindex V E @pindex calc-set-enumerate @tindex venum @@ -20274,6 +20323,7 @@ the intervals. This only works for finite sets (i.e., sets which do not involve @samp{-inf} or @samp{inf}). +@kindex v : @kindex V : @pindex calc-set-span @tindex vspan @@ -20283,6 +20333,7 @@ limit will be the largest element. For an empty set, @samp{vspan([])} returns the empty interval @w{@samp{[0 .. 0)}}. +@kindex v # @kindex V # @pindex calc-set-cardinality @tindex vcard @@ -20702,6 +20753,7 @@ The commands in this section allow for more general operations on the elements of vectors. +@kindex v A @kindex V A @pindex calc-apply @tindex apply @@ -20879,6 +20931,7 @@ @subsection Mapping @noindent +@kindex v M @kindex V M @pindex calc-map @tindex map @@ -20975,6 +21028,7 @@ @subsection Reducing @noindent +@kindex v R @kindex V R @pindex calc-reduce @tindex reduce @@ -20987,6 +21041,7 @@ and so on. In general, reducing @code{f} over the vector @samp{[a, b, c, d]} produces @samp{f(f(f(a, b), c), d)}. +@kindex I v R @kindex I V R @tindex rreduce The @kbd{I V R} [@code{rreduce}] command is similar to @kbd{V R} except @@ -20996,6 +21051,7 @@ or @samp{a - b + c - d}. This ``alternating sum'' occurs frequently in power series expansions. +@kindex v U @kindex V U @tindex accum The @kbd{V U} (@code{calc-accumulate}) [@code{accum}] command does an @@ -21005,6 +21061,7 @@ the vector @samp{[a, b, c, d]} produces the vector @samp{[a, a + b, a + b + c, a + b + c + d]}. +@kindex I v U @kindex I V U @tindex raccum The @kbd{I V U} [@code{raccum}] command does a right-to-left accumulation. @@ -21052,6 +21109,7 @@ @subsection Nesting and Fixed Points @noindent +@kindex H v R @kindex H V R @tindex nest The @kbd{H V R} [@code{nest}] command applies a function to a given @@ -21062,6 +21120,7 @@ negative if Calc knows an inverse for the function @samp{f}; for example, @samp{nest(sin, a, -2)} returns @samp{arcsin(arcsin(a))}. +@kindex H v U @kindex H V U @tindex anest The @kbd{H V U} [@code{anest}] command is an accumulating version of @@ -21070,6 +21129,7 @@ @samp{F} is the inverse of @samp{f}, then the result is of the form @samp{[a, F(a), F(F(a)), F(F(F(a)))]}. +@kindex H I v R @kindex H I V R @tindex fixp @cindex Fixed points @@ -21078,6 +21138,7 @@ applied until it reaches a ``fixed point,'' i.e., until the result no longer changes. +@kindex H I v U @kindex H I V U @tindex afixp The @kbd{H I V U} [@code{afixp}] command is an accumulating @code{fixp}. @@ -21127,6 +21188,7 @@ @node Generalized Products, , Nesting and Fixed Points, Reducing and Mapping @subsection Generalized Products +@kindex v O @kindex V O @pindex calc-outer-product @tindex outer @@ -21138,6 +21200,7 @@ the result matrix is obtained by applying the operator to element @var{r} of the lefthand vector and element @var{c} of the righthand vector. +@kindex v I @kindex V I @pindex calc-inner-product @tindex inner @@ -21170,10 +21233,13 @@ influenced by the @kbd{d O} (@code{calc-flat-language}) mode; @pxref{Normal Language Modes}. +@kindex v < @kindex V < @pindex calc-matrix-left-justify +@kindex v = @kindex V = @pindex calc-matrix-center-justify +@kindex v > @kindex V > @pindex calc-matrix-right-justify The commands @kbd{v <} (@code{calc-matrix-left-justify}), @kbd{v >} @@ -21181,10 +21247,13 @@ (@code{calc-matrix-center-justify}) control whether matrix elements are justified to the left, right, or center of their columns. +@kindex v [ @kindex V [ @pindex calc-vector-brackets +@kindex v @{ @kindex V @{ @pindex calc-vector-braces +@kindex v ( @kindex V ( @pindex calc-vector-parens The @kbd{v [} (@code{calc-vector-brackets}) command turns the square @@ -21199,15 +21268,21 @@ and parentheses may never be used for this purpose. @kindex V ] +@kindex v ] +@kindex V ) +@kindex v ) +@kindex V @} +@kindex v @} @pindex calc-matrix-brackets The @kbd{v ]} (@code{calc-matrix-brackets}) command controls the -``big'' style display of matrices. It prompts for a string of code -letters; currently implemented letters are @code{R}, which enables -brackets on each row of the matrix; @code{O}, which enables outer -brackets in opposite corners of the matrix; and @code{C}, which -enables commas or semicolons at the ends of all rows but the last. -The default format is @samp{RO}. (Before Calc 2.00, the format -was fixed at @samp{ROC}.) Here are some example matrices: +``big'' style display of matrices, for matrices which have more than +one row. It prompts for a string of code letters; currently +implemented letters are @code{R}, which enables brackets on each row +of the matrix; @code{O}, which enables outer brackets in opposite +corners of the matrix; and @code{C}, which enables commas or +semicolons at the ends of all rows but the last. The default format +is @samp{RO}. (Before Calc 2.00, the format was fixed at @samp{ROC}.) +Here are some example matrices: @example @group @@ -21246,6 +21321,7 @@ @samp{OC} are all recognized as matrices during reading, while the others are useful for display only. +@kindex v , @kindex V , @pindex calc-vector-commas The @kbd{v ,} (@code{calc-vector-commas}) command turns commas on and @@ -21261,6 +21337,7 @@ ambiguity) by adding the letter @code{P} to the control string you give to @kbd{v ]} (as described above). +@kindex v . @kindex V . @pindex calc-full-vectors The @kbd{v .} (@code{calc-full-vectors}) command turns abbreviated @@ -21282,6 +21359,7 @@ large vectors, this mode will improve the speed of all operations that involve the trail. +@kindex v / @kindex V / @pindex calc-break-vectors The @kbd{v /} (@code{calc-break-vectors}) command turns multi-line