Subversion Repositories wimsdev

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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