From: Vadim V. Z. <vv...@us...> - 2007-06-12 19:59:14
|
Update of /cvsroot/maxima/maxima/doc/info In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22688 Modified Files: augmented_lagrangian.texi descriptive.texi lbfgs.texi linearalgebra.texi nset.texi orthopoly.texi romberg.texi stats.texi stringproc.texi Log Message: Make some input lines for automatically generated examples (lines between @c ===beg== and @c ===end==) shorter. Script update_examples can be used to re-create actual @example contents using lines between @c ===beg=== and @c ===end== as input. Index: augmented_lagrangian.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/augmented_lagrangian.texi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- augmented_lagrangian.texi 12 Jun 2007 13:59:32 -0000 1.6 +++ augmented_lagrangian.texi 12 Jun 2007 19:59:07 -0000 1.7 @@ -59,7 +59,7 @@ @c xx: [x, y]; @c C: [x + y - 1]; @c yy: [1, 1]; -@c augmented_lagrangian_method (FOM, xx, C, yy, iprint = [-1, 0]); +@c augmented_lagrangian_method(FOM, xx, C, yy, iprint=[-1,0]); @c ===end=== @example (%i1) load (lbfgs); Index: descriptive.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/descriptive.texi,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- descriptive.texi 12 Jun 2007 13:36:20 -0000 1.11 +++ descriptive.texi 12 Jun 2007 19:59:08 -0000 1.12 @@ -843,7 +843,8 @@ @c load (descriptive)$ @c load (numericalio)$ @c s1 : read_list (file_search ("pidigits.data"))$ -@c /* 1st and 3rd quartiles */ [quantile (s1, 1/4), quantile (s1, 3/4)], numer; +@c /* 1st and 3rd quartiles */ +@c [quantile (s1, 1/4), quantile (s1, 3/4)], numer; @c s2 : read_matrix (file_search ("wind.data"))$ @c quantile (s2, 1/4); @c ===end=== @@ -1816,9 +1817,9 @@ @c load (descriptive)$ @c load (numericalio)$ @c s1 : read_list (file_search ("pidigits.data"))$ -@c dataplot (makelist (s1[k], k, 1, 50), 'maintitle = "First pi digits", +@c dataplot (makelist (s1[k], k, 1, 50), @c 'axisnames = ["digit order", "digit value"], 'pointstyle = 2, -@c 'joined = true)$ +@c 'maintitle = "First pi digits", 'joined = true)$ @c ===end=== @example (%i1) load (descriptive)$ @@ -1869,10 +1870,12 @@ @c load (descriptive)$ @c load (numericalio)$ @c s2 : read_matrix (file_search ("wind.data"))$ -@c /* 3D plot */ dataplot (submatrix (s2, 4, 5), 'pointstyle = 2, +@c /* 3D plot */ +@c dataplot (submatrix (s2, 4, 5), 'pointstyle = 2, @c 'maintitle = "Pairs of wind speeds measured in knots", @c 'axisnames = ["Station A", "Station B", "Station C"])$ -@c /* Multivariate scatterplot */ dataplot (submatrix (s2, 4, 5), +@c /* Multivariate scatterplot */ +@c dataplot (submatrix (s2, 4, 5), @c 'nclasses = 6, 'threedim = false)$ @c ===end=== @example @@ -1946,8 +1949,9 @@ @c load (descriptive)$ @c load (numericalio)$ @c s1 : read_list (file_search ("pidigits.data"))$ -@c histogram (s1, 'maintitle = "pi digits", 'axisnames = ["", "Absolute frequency"], -@c 'relbarwidth = 0.2, 'barcolor = 3, 'colorintensity = 0.6)$ +@c histogram (s1, 'maintitle = "pi digits", +@c 'axisnames = ["", "Absolute frequency"], 'relbarwidth = 0.2, +@c 'barcolor = 3, 'colorintensity = 0.6)$ @c s2 : read_matrix (file_search ("wind.data"))$ @c histogram (col (s2, 3), 'colorintensity = 0.3)$ @c ===end=== Index: lbfgs.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/lbfgs.texi,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- lbfgs.texi 12 Jun 2007 13:59:33 -0000 1.5 +++ lbfgs.texi 12 Jun 2007 19:59:08 -0000 1.6 @@ -245,7 +245,8 @@ and @code{plot2d} displays a comparison of @math{F} with the observed data. @c ===beg=== @c load (lbfgs); -@c FOM : '((1/length(X))*sum((F(X[i]) - Y[i])^2, i, 1, length(X))); +@c FOM : '((1/length(X))*sum((F(X[i]) - Y[i])^2, i, 1, +@c length(X))); @c X : [1, 2, 3, 4, 5]; @c Y : [0, 0.5, 1, 1.25, 1.5]; @c F(x) := A/(1 + exp(-B*(x - C))); Index: linearalgebra.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/linearalgebra.texi,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- linearalgebra.texi 12 Jun 2007 13:36:23 -0000 1.14 +++ linearalgebra.texi 12 Jun 2007 19:59:08 -0000 1.15 @@ -21,7 +21,8 @@ @c tellrat (MM [3, 3]); @c MM : ratsimp (MM); @c nullspace (MM); -@c M : matrix ([1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]); +@c M : matrix ([1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], +@c [13, 14, 15, 16]); @c columnspace (M); @c apply ('orthogonal_complement, args (nullspace (transpose (M)))); @c ===end=== @@ -182,11 +183,11 @@ Maxima expression, the copy function is the most useful when @var{e} is either a list or a matrix; consider: @c ===beg=== -m : [1,[2,3]]$ -mm : m$ -mm[2][1] : x$ -m; -mm; +@c m : [1,[2,3]]$ +@c mm : m$ +@c mm[2][1] : x$ +@c m; +@c mm; @c ===end=== @example (%i1) m : [1,[2,3]]$ @@ -199,11 +200,11 @@ @end example Let's try the same experiment, but this time let @var{mm} be a copy of @var{m} @c ===beg=== -m : [1,[2,3]]$ -mm : copy(m)$ -mm[2][1] : x$ -m; -mm; +@c m : [1,[2,3]]$ +@c mm : copy(m)$ +@c mm[2][1] : x$ +@c m; +@c mm; @c ===end=== @example (%i6) m : [1,[2,3]]$ @@ -730,7 +731,8 @@ @c ===beg=== @c polynomialp ((x + 1)*(x + 2)^(3/2), [x], numberp, numberp); -@c polynomialp ((x^(1/2) + 1)*(x + 2)^(3/2), [x], numberp, numberp); +@c polynomialp ((x^(1/2) + 1)*(x + 2)^(3/2), [x], numberp, +@c numberp); @c ===end=== @example (%i1) polynomialp ((x + 1)*(x + 2)^(3/2), [x], numberp, numberp); Index: nset.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/nset.texi,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- nset.texi 12 Jun 2007 13:36:24 -0000 1.23 +++ nset.texi 12 Jun 2007 19:59:08 -0000 1.24 @@ -221,7 +221,8 @@ in a given set that do not depend on a variable @code{z}, use @c ===beg=== -@c subset ({x + y + z, x - y + 4, x + y - 5}, lambda ([e], freeof (z, e))); +@c subset ({x + y + z, x - y + 4, x + y - 5}, +@c lambda ([e], freeof (z, e))); @c ===end=== @example (%i1) subset (@{x + y + z, x - y + 4, x + y - 5@}, @@ -461,7 +462,8 @@ @c ===beg=== @c makelist (belln (i), i, 0, 6); @c is (cardinality (set_partitions ({})) = belln (0)); -@c is (cardinality (set_partitions ({1, 2, 3, 4, 5, 6})) = belln (6)); +@c is (cardinality (set_partitions ({1, 2, 3, 4, 5, 6})) = +@c belln (6)); @c ===end=== @example (%i1) makelist (belln (i), i, 0, 6); @@ -722,7 +724,8 @@ The equivalence relation is a lambda expression which returns @code{true} or @code{false}. @c ===beg=== -@c equiv_classes ({1, 1.0, 2, 2.0, 3, 3.0}, lambda ([x, y], is (equal (x, y)))); +@c equiv_classes ({1, 1.0, 2, 2.0, 3, 3.0}, +@c lambda ([x, y], is (equal (x, y)))); @c ===end=== @example (%i1) equiv_classes (@{1, 1.0, 2, 2.0, 3, 3.0@}, @@ -744,7 +747,8 @@ The equivalence classes are numbers which differ by a multiple of 3. @c ===beg=== -@c equiv_classes ({1, 2, 3, 4, 5, 6, 7}, lambda ([x, y], remainder (x - y, 3) = 0)); +@c equiv_classes ({1, 2, 3, 4, 5, 6, 7}, +@c lambda ([x, y], remainder (x - y, 3) = 0)); @c ===end=== @example (%i1) equiv_classes (@{1, 2, 3, 4, 5, 6, 7@}, @@ -828,7 +832,8 @@ @c ===beg=== @c prederror : false; -@c map (lambda ([a, b], is (a < b)), [x, y, z], [x^2, y^2, z^2]); +@c map (lambda ([a, b], is (a < b)), [x, y, z], +@c [x^2, y^2, z^2]); @c every ("<", [x, y, z], [x^2, y^2, z^2]); @c prederror : true; @c every ("<", [x, y, z], [x^2, y^2, z^2]); @@ -1617,7 +1622,8 @@ @c ===beg=== @c partition_set ({2, 7, 1, 8, 2, 8}, evenp); -@c partition_set ({x, rat(y), rat(y) + z, 1}, lambda ([x], ratp(x))); +@c partition_set ({x, rat(y), rat(y) + z, 1}, +@c lambda ([x], ratp(x))); @c ===end=== @example (%i1) partition_set (@{2, 7, 1, 8, 2, 8@}, evenp); @@ -2068,7 +2074,8 @@ @c ===beg=== @c prederror : false; -@c map (lambda ([a, b], is (a < b)), [x, y, z], [x^2, y^2, z^2]); +@c map (lambda ([a, b], is (a < b)), [x, y, z], +@c [x^2, y^2, z^2]); @c some ("<", [x, y, z], [x^2, y^2, z^2]); @c some ("<", [x, y, z], [x^2, y^2, z + 1]); @c prederror : true; Index: orthopoly.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/orthopoly.texi,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- orthopoly.texi 12 Jun 2007 13:36:24 -0000 1.12 +++ orthopoly.texi 12 Jun 2007 19:59:08 -0000 1.13 @@ -248,7 +248,8 @@ is unable to simplify it to zero. @c ===beg=== -@c (2*n - 1) * legendre_p (n - 1, x) * x - n * legendre_p (n, x) + (1 - n) * legendre_p (n - 2, x); +@c (2*n - 1) * legendre_p (n - 1, x) * x - n * legendre_p (n, x) +@c + (1 - n) * legendre_p (n - 2, x); @c ===end=== @example (%i1) (2*n - 1) * legendre_p (n - 1, x) * x - n * legendre_p (n, x) @@ -472,7 +473,8 @@ @c ===beg=== @c infix ("@+")$ -@c "@+"(x,y) := interval (part (x, 1) + part (y, 1), part (x, 2) + part (y, 2))$ +@c "@+"(x,y) := interval (part (x, 1) + part (y, 1), part (x, 2) +@c + part (y, 2))$ @c legendre_p (7, 0.1) @+ legendre_p (8, 0.1); @c ===end=== @example @@ -535,7 +537,8 @@ a Legendre polynomial. @c ===beg=== -@c plot2d ('(legendre_p (5, x)), [x, 0, 1]), orthopoly_returns_intervals : false; +@c plot2d ('(legendre_p (5, x)), [x, 0, 1]), +@c orthopoly_returns_intervals : false; @c ===end=== @example (%i1) plot2d ('(legendre_p (5, x)), [x, 0, 1]), Index: romberg.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/romberg.texi,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- romberg.texi 12 Jun 2007 13:36:25 -0000 1.3 +++ romberg.texi 12 Jun 2007 19:59:08 -0000 1.4 @@ -56,7 +56,8 @@ A 1-dimensional integration. @c ===beg=== @c load (romberg); -@c f(x) := 1/((x - 1)^2 + 1/100) + 1/((x - 2)^2 + 1/1000) + 1/((x - 3)^2 + 1/200); +@c f(x) := 1/((x - 1)^2 + 1/100) + 1/((x - 2)^2 + 1/1000) +@c + 1/((x - 3)^2 + 1/200); @c rombergtol : 1e-6; @c rombergit : 15; @c estimate : romberg (f(x), x, -5, 5); Index: stats.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/stats.texi,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- stats.texi 12 Jun 2007 13:36:26 -0000 1.6 +++ stats.texi 12 Jun 2007 19:59:08 -0000 1.7 @@ -500,7 +500,8 @@ @c load (stats)$ @c x: [20.4,62.5,61.3,44.2,11.1,23.7]$ @c y: [1.2,6.9,38.7,20.4,17.2]$ -@c test_means_difference(x,y,'alternative='greater,'varequal=true); +@c test_means_difference(x,y,'alternative='greater, +@c 'varequal=true); @c ===end=== @example (%i1) load("stats")$ @@ -1212,7 +1213,8 @@ @c ===beg=== @c load (stats)$ -@c s:[[125,140.7],[130,155.1],[135,160.3],[140,167.2],[145,169.8]]$ +@c s:[[125,140.7], [130,155.1], [135,160.3], [140,167.2], +@c [145,169.8]]$ @c z:simple_linear_regression(s,conflevel=0.99); @c plot2d([[discrete, s], take_inference(model,z)], @c [x,120,150], Index: stringproc.texi =================================================================== RCS file: /cvsroot/maxima/maxima/doc/info/stringproc.texi,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- stringproc.texi 12 Jun 2007 13:36:26 -0000 1.9 +++ stringproc.texi 12 Jun 2007 19:59:08 -0000 1.10 @@ -340,12 +340,13 @@ @c ===beg=== @c for n from 0 thru 255 do ( -@c tmp: ascii(n), if alphacharp(tmp) then sprint(tmp), if n=96 then newline() )$ +@c tmp: ascii(n), if alphacharp(tmp) then sprint(tmp), +@c if n=96 then newline() )$ @c ===end=== @example (%i1) for n from 0 thru 255 do ( -tmp: ascii(n), if alphacharp(tmp) then sprint(tmp), - if n=96 then newline() )$ + tmp: ascii(n), if alphacharp(tmp) then sprint(tmp), + if n=96 then newline() )$ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z @end example |