spielwiese
Last change
on this file since 6fb723 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:
530 bytes
|
Line | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "jacobson.lib"; |
---|
3 | ring R=(0,m,M,L1,L2,m1,m2,g), D, lp; // two pendula example |
---|
4 | matrix P[3][4]=m1*L1*D^2,m2*L2*D^2,(M+m1+m2)*D^2,-1, |
---|
5 | m1*L1^2*D^2-m1*L1*g,0,m1*L1*D^2,0,0, |
---|
6 | m2*L2^2*D^2-m2*L2*g,m2*L2*D^2,0; |
---|
7 | list s=smith(P,1); // returns a list with 3 entries |
---|
8 | print(s[2]); // a diagonal form, close to the Smith form |
---|
9 | print(s[1]); // U, left transformation matrix |
---|
10 | list t = divideUnits(s); |
---|
11 | print(t[2]); // the Smith form of the matrix P |
---|
12 | print(t[1]); // U', modified left transformation matrix |
---|
13 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.