source: git/Tst/Manual/leftInverse.tst @ e74bb4

fieker-DuValspielwiese
Last change on this file since e74bb4 was 8a2e90, checked in by Hans Schoenemann <hannes@…>, 6 years ago
fix: module * module is undefined
  • Property mode set to 100644
File size: 459 bytes
Line 
1LIB "tst.lib"; tst_init();
2LIB "control.lib";
3// a trivial example:
4ring r = 0,(x,z),dp;
5matrix M[2][1] = 1,x2z;
6print(M);
7print( leftInverse(M) );
8kill r;
9// derived from the example TwoPendula:
10ring r=(0,m1,m2,M,g,L1,L2),Dt,dp;
11matrix U[3][1];
12U[1,1]=(-L2)*Dt^4+(g)*Dt^2;
13U[2,1]=(-L1)*Dt^4+(g)*Dt^2;
14U[3,1]=(L1*L2)*Dt^4+(-g*L1-g*L2)*Dt^2+(g^2);
15module M = module(U);
16module L = leftInverse(M);
17print(L);
18// check
19print(matrix(L)*matrix(M));
20tst_status(1);$
Note: See TracBrowser for help on using the repository browser.