source: git/Tst/Manual/divideUnits.tst @ 6fb723

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