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 | |
---|
1 | LIB "tst.lib"; tst_init(); |
---|
2 | LIB "control.lib"; |
---|
3 | // a trivial example: |
---|
4 | ring r = 0,(x,z),dp; |
---|
5 | matrix M[2][1] = 1,x2z; |
---|
6 | print(M); |
---|
7 | print( leftInverse(M) ); |
---|
8 | kill r; |
---|
9 | // derived from the example TwoPendula: |
---|
10 | ring r=(0,m1,m2,M,g,L1,L2),Dt,dp; |
---|
11 | matrix U[3][1]; |
---|
12 | U[1,1]=(-L2)*Dt^4+(g)*Dt^2; |
---|
13 | U[2,1]=(-L1)*Dt^4+(g)*Dt^2; |
---|
14 | U[3,1]=(L1*L2)*Dt^4+(-g*L1-g*L2)*Dt^2+(g^2); |
---|
15 | module M = module(U); |
---|
16 | module L = leftInverse(M); |
---|
17 | print(L); |
---|
18 | // check |
---|
19 | print(matrix(L)*matrix(M)); |
---|
20 | tst_status(1);$ |
---|
Note: See
TracBrowser
for help on using the repository browser.