Subversion Repositories wimsdev

Rev

Rev 74 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <p><center><h2>Complete list of parameter functions</h2></center>
  2.  
  3. <p>$table_header
  4. <caption>Randomization</caption>
  5. $table_tr<th>Function<th>Effect
  6. $table_tr<td><tt>random(-5..5)
  7.     <td>a random number between -5 and 5
  8. $table_tr<td><tt>randint(-5..5)
  9.     <td>a random integer between -5 and 5 (inclusive)
  10. $table_tr<td><tt>random(1,2,3,a,b,c)
  11.     <td>a random item within {1,2,3,a,b,c}
  12. $table_tr<td><tt>shuffle(6)
  13.     <td>a list of 6 integers 1,2,...,6, in a random order.
  14. $table_tr<td><tt>shuffle(a,b,c,d,e)
  15.     <td>the list of letters {a,b,c,d,e}, in a random order.
  16. $table_tr<td><tt>randomitem(\list)
  17.     <td>a random item of (comma-separated) \list.
  18. $table_tr<td><tt>randomrow(\mat)
  19.     <td>a random row of the matrix \mat.
  20. $table_end
  21. <p>$table_header
  22. <caption>Data and list manipulation</caption>
  23. $table_tr<td><tt>items(a,b,c,d,e,f)
  24.     <td>the number of items (here it's 6) in the list
  25.     {a,b,c,d,e,f}
  26. $table_tr<td><tt>item(3,a,b,c,d,e,f)
  27.    <td>item number 3 of the list {a,b,c,d,e,f} (hence c)
  28. $table_tr<td><tt>item(3,\ll)
  29.    <td>item number 3 of the list \ll (same as <tt>\ll[3]</tt>)
  30. $table_tr<td><tt>item(2..5,a,b,c,d,e,f)
  31.    <td>items number 2 to 5 of the list {a,b,c,d,e,f} (hence b,c,d,e)
  32. $table_tr<td><tt>item([2,4],\ll)
  33.    <td>items number 2 and 4 of the list \ll (same as
  34.    <tt>\ll[2,4]</tt>)
  35. $table_tr<td><tt>position(make,do,go,make,take)
  36.    <td>number of position of the item `make' in the list
  37.     {do,go,make,take} (hence 3)
  38. $table_tr<td><tt>rows(\m)
  39.     <td>the number of rows in the matrix \m
  40. $table_tr<td><tt>row(2,\m)
  41.     <td>row number 2 of the matrix \m (same as <tt>\m[2;]</tt>)
  42. $table_tr<td><tt>row(2..5,\m)
  43.     <td>the submatrix of \m consisting of rows number 2 to 5
  44.     (same as <tt>\m[2..5;]</tt>)
  45. $table_tr<td><tt>row([1,3],1,2,3<br>3,4,5<br>5,6,7)
  46.     <td>the submatrix of the 3&times;3 matrix consisting of the first
  47.     and the last rows
  48. $table_tr<td><tt>row(column 1 > 1 and column 2 = good,\mat)
  49.     <td>the submatrix of \mat consisting of rows where column 1 is > 1 and
  50.     column 2 is the word `good'
  51. $table_tr<td><tt>randomitem(\list)
  52.    <td>a random item of (comma-separated) \list.
  53. $table_tr<td><tt>randomrow(\mat)
  54.    <td>a random row of the matrix \mat.
  55. $table_tr<td><tt>column(2,\m)
  56.    <td>items of column number 2 of the matrix \m,
  57.    as a comma-separated list (same as <tt>\m[;2]</tt>)
  58. $table_tr<td><tt>column(2..5,\m)
  59.    <td>the submatrix of \m consisting of columns number 2 to 5
  60.    (same as <tt>\m[;2..5]</tt>)
  61. $table_tr<td><tt>column([1,3],1,2,3<br>3,4,5<br>5,6,7)
  62.    <td>the submatrix of the 3&times;3 matrix consisting of the first
  63.    and the last columns
  64. $table_tr<td><tt>asis(How do you do? item(1,2,3))
  65.    <td>the string as it is, protected from transformations and conditionality.
  66.  
  67. $table_end<p>$table_header
  68. <caption>Mathematical functions</caption>
  69. $table_tr<td><tt>evalue(x^2+sin(y),x=3,y=4)
  70.    <td>evaluation of the function x^2+sin(y),<br>
  71.    for x=3, y=4
  72. $table_tr<td><tt>solve(x^3-3*x+1,x=0..1)
  73.    <td>the simple root of x^3-3x+1 between 0 and 1
  74. $table_tr<td><tt>simplify(x^5*y^3*x^2/y)
  75.    <td>simplified expression: x<sup>7</sup>y<sup>2</sup>
  76. $table_tr<td><tt>diff(sin(x)+cos(y),x)
  77.    <td>the derivative of sin(x)+cos(y) with respect to x
  78. $table_tr<td><tt>int(x^2+3*x+1,x)
  79.    <td>anti-derivative of x^2+3*x+1,<br>
  80.     the constant term being undertermined
  81. !!$table_tr<td><tt>int(t^2+3*t+1,t=1..x)
  82. !!    <td>the anti-derivative g of x^2+3*x+1 such that g(1)=0
  83. $table_tr<td><tt>int(t^2+3*t+1,t=0..1)
  84.    <td>the numerical integration of x^2+3*x+1, from 0 to 1
  85. $table_tr<td><tt>det(\mat)
  86.    <td>determinant of the matrix \mat
  87. $table_tr<td><tt>htmlmath(2*x^2+3*x)
  88.    <td>the best possible way to render the expression<br>
  89.    in html way: 2x<sup>2</sup>+3x
  90. $table_tr<td><tt>texmath(2*x^2+3*x)
  91.    <td>the TeX source of the expression
  92.  
  93. $table_end<p>$table_header
  94. <caption>Advanced facilities</caption>
  95. $table_tr<td><tt>pari(factor(2^101-1))
  96.    <td>call PARI/GP: here to factor an integer
  97. $table_tr<td><tt>maxima(integrate(x^2+1,x);)
  98.    <td>call Maxima: here to integrate a function
  99. $table_tr<td><tt>yacas(Taylor(x,0,10) cos(x^2+x+1))
  100.    <td>call Yacas: here to compute a Taylor expansion
  101. $table_tr<td><tt>wims(sort items \list)
  102.    <td>use wims !sort command to sort items in the list \list
  103. $table_tr<td><tt>wims(listintersect \list1 and \list2)
  104.    <td>use wims !listintersect command to get the common items of
  105.    \list1 and \list2
  106. $table_tr<td><tt>draw(draw source ...)
  107.    <td>draw a picture, the source is the same as in <tt>\draw</tt>,
  108.    with the image size as the first line.
  109.    The output is an image URL.
  110. $table_tr<td><tt>slib(matrix/invertible 3,5)
  111.    <td>Read
  112.    !href module=help/wimsdoc&subject=slib#slib WIMS slib
  113.    matrix/invertible to generate an invertible 3x3
  114.    matrix of range 5.
  115. $table_end
  116.  
  117. <p>
  118. Available types of parameters: integer, real, complex, function, text, matrix.
  119. <p>
  120.  
  121.