source: git/Tst/Old/subexpr1.tst @ 480d5e

fieker-DuValspielwiese
Last change on this file since 480d5e was 97d5bb, checked in by Olaf Bachmann <obachman@…>, 24 years ago
* cleaned up tst stuff git-svn-id: file:///usr/local/Singular/svn/trunk@3893 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 833 bytes
Line 
1//
2// examples for subexpr notation in matrices and ideals
3//
4LIB "lib";
5pagelength = 1000;
6ring r = 33,(x,y,z),lp;
7matrix mm[5][5] = x1,x2,x3,x4,x5;
8     mm[1,1..5];
9     mm[2,1..5];
10     mm[3,1..5];
11     mm[4,1..5];
12     mm[5,1..5];
13"----------------";
14mm[1..5,1] = mm[1,1..5];
15     mm[1,1..5];
16     mm[2,1..5];
17     mm[3,1..5];
18     mm[4,1..5];
19     mm[5,1..5];
20"----------------";
213 * mm[1..5,1];
22"----------------";
23mm[1..5,1] * 4;
24mm[1..5,2] = mm[1..5,1] + 2 * mm[1..5,1];
25"----------------";
26     mm[1,1..5];
27     mm[2,1..5];
28     mm[3,1..5];
29     mm[4,1..5];
30     mm[5,1..5];
31"----------------";
32fixmat(mm,6);  // formmat(mm) would be slower !!
33mm[1..3,1..3] = stransp(3,3,mm[1..3,1..3]);
34"----------------";
35fixmat(mm,6);
36matrix u[8][8] = unitmat(8,4);
37"----------------";
38fixmat(u,3);
39kill r;
40LIB "tst.lib";tst_status(1);$
Note: See TracBrowser for help on using the repository browser.