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