fieker-DuValspielwiese
Last change
on this file since 894057 was
894057,
checked in by Oleksandr Motsak <motsak@…>, 13 years ago
|
ADD: Tests from online manual (res+stat on mamawutz): short ones Tst/Manual/s.lst
|
-
Property mode set to
100644
|
File size:
538 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | intmat m[2][4] = 1,0,2,4,0,1,-1,0,3,2,1,-2; |
---|
3 | m; |
---|
4 | m[2,3]; // entry at row 2, col 3 |
---|
5 | size(m); // number of entries |
---|
6 | intvec v = 1,0,-1,2; |
---|
7 | m * v; |
---|
8 | typeof(_); |
---|
9 | intmat m1[4][3] = 0,1,2,3,v,1; |
---|
10 | intmat m2 = m * m1; |
---|
11 | m2; // 2 x 3 intmat |
---|
12 | m2*10; // multiply each entry of m with 10; |
---|
13 | -m2; |
---|
14 | m2 % 2; |
---|
15 | m2 div 2; |
---|
16 | m2[2,1]; // entry at row 2, col 1 |
---|
17 | m1[2..3,2..3]; // submatrix |
---|
18 | m2[nrows(m2),ncols(m2)]; // the last entry of intmat m2 |
---|
19 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.