gentran.log 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. Sat Jun 29 14:11:06 PDT 1991
  2. REDUCE 3.4, 15-Jul-91 ...
  3. 1: 1:
  4. 2: 2:
  5. 3: 3: MATRIX M(3,3)$
  6. M(1,1) := 18*COS(Q3)*COS(Q2)*M30*P**2 - 9*SIN(Q3)**2*P**2*M30
  7. - SIN(Q3)**2*J30Y + SIN(Q3)**2*J30Z + P**2*M10
  8. + 18*P**2*M30 + J10Y + J30Y;
  9. 2 2 2 2
  10. M(1,1) := - 9*SIN(Q3) *P *M30 - SIN(Q3) *J30Y + SIN(Q3) *J30Z
  11. 2 2 2
  12. + 18*COS(Q3)*COS(Q2)*P *M30 + 18*P *M30 + P *M10 + J30Y
  13. + J10Y
  14. M(2,1) :=
  15. M(1,2) := 9*COS(Q3)*COS(Q2)*M30*P**2 - SIN(Q3)**2*J30Y +
  16. SIN(Q3)**2*J30Z - 9*SIN(Q3)**2*M30*P**2 + J30Y +
  17. 9*M30*P**2;
  18. 2 2 2
  19. M(2,1) := M(1,2) := - 9*SIN(Q3) *P *M30 - SIN(Q3) *J30Y
  20. 2 2 2
  21. + SIN(Q3) *J30Z + 9*COS(Q3)*COS(Q2)*P *M30 + 9*P *M30 + J30Y
  22. M(3,1) :=
  23. M(1,3) := -9*SIN(Q3)*SIN(Q2)*M30*P**2;
  24. 2
  25. M(3,1) := M(1,3) := - 9*SIN(Q3)*SIN(Q2)*P *M30
  26. M(2,2) := -SIN(Q3)**2*J30Y + SIN(Q3)**2*J30Z - 9*SIN(Q3)**2
  27. *M30*P**2 + J30Y + 9*M30*P**2;
  28. 2 2 2 2
  29. M(2,2) := - 9*SIN(Q3) *P *M30 - SIN(Q3) *J30Y + SIN(Q3) *J30Z
  30. 2
  31. + 9*P *M30 + J30Y
  32. M(3,2) :=
  33. M(2,3) := 0;
  34. M(3,2) := M(2,3) := 0
  35. M(3,3) := 9*M30*P**2 + J30X;
  36. 2
  37. M(3,3) := 9*P *M30 + J30X
  38. GENTRANLANG!* := 'FORTRAN$
  39. FORTLINELEN!* := 72$
  40. GENTRAN LITERAL "C", CR!*,
  41. "C", TAB!*, "*** COMPUTE VALUES FOR MATRIX M ***", CR!*,
  42. "C", CR!*$
  43. C
  44. C *** COMPUTE VALUES FOR MATRIX M ***
  45. C
  46. FOR j:=1:3 DO
  47. FOR k:=j:3 DO
  48. GENTRAN M(j,k) ::=: M(j,k)$
  49. M(1,1)=-(9.0*SIN(REAL(Q3))**2*P**2*M30)-(SIN(REAL(Q3))**2*J30Y)+
  50. . SIN(REAL(Q3))**2*J30Z+18.0*COS(REAL(Q3))*COS(REAL(Q2))*P**2*M30+
  51. . 18.0*P**2*M30+P**2*M10+J30Y+J10Y
  52. M(1,2)=-(9.0*SIN(REAL(Q3))**2*P**2*M30)-(SIN(REAL(Q3))**2*J30Y)+
  53. . SIN(REAL(Q3))**2*J30Z+9.0*COS(REAL(Q3))*COS(REAL(Q2))*P**2*M30+
  54. . 9.0*P**2*M30+J30Y
  55. M(1,3)=-(9.0*SIN(REAL(Q3))*SIN(REAL(Q2))*P**2*M30)
  56. M(2,2)=-(9.0*SIN(REAL(Q3))**2*P**2*M30)-(SIN(REAL(Q3))**2*J30Y)+
  57. . SIN(REAL(Q3))**2*J30Z+9.0*P**2*M30+J30Y
  58. M(2,3)=0.0
  59. M(3,3)=9.0*P**2*M30+J30X
  60. GENTRAN LITERAL "C", CR!*,
  61. "C", TAB!*, "*** COMPUTE VALUES FOR INVERSE MATRIX ***",
  62. CR!*,
  63. "C", CR!*$
  64. C
  65. C *** COMPUTE VALUES FOR INVERSE MATRIX ***
  66. C
  67. SHARE var$
  68. FOR j:=1:3 DO
  69. FOR k:=j:3 DO
  70. IF M(j,k) NEQ 0 THEN
  71. <<
  72. var := TEMPVAR NIL;
  73. MARKVAR var;
  74. M(j,k) := var;
  75. M(k,j) := var;
  76. GENTRAN
  77. EVAL(var) := M(EVAL(j),EVAL(k))
  78. >>$
  79. T0=M(1,1)
  80. T1=M(1,2)
  81. T2=M(1,3)
  82. T3=M(2,2)
  83. T4=M(3,3)
  84. COMMENT -- Contents of Matrix M: --$
  85. M := M;
  86. [T0 T1 T2]
  87. [ ]
  88. M := [T1 T3 0 ]
  89. [ ]
  90. [T2 0 T4]
  91. MATRIX MXINV(3,3)$
  92. MXINV := M**(-1)$
  93. FOR j:=1:3 DO
  94. FOR k:=j:3 DO
  95. GENTRAN MXINV(j,k) ::=: MXINV(j,k)$
  96. MXINV(1,1)=(T3*T4)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  97. MXINV(1,2)=-(T1*T4)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  98. MXINV(1,3)=-(T2*T3)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  99. MXINV(2,2)=(T0*T4-T2**2)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  100. MXINV(2,3)=(T1*T2)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  101. MXINV(3,3)=(T0*T3-T1**2)/(T0*T3*T4-(T1**2*T4)-(T2**2*T3))
  102. GENTRAN
  103. for j:=1:3 do
  104. for k:=j+1:3 do
  105. <<
  106. m(k,j) := m(j,k);
  107. mxinv(k,j) := mxinv(j,k)
  108. >>$
  109. DO 25001 J=1,3
  110. DO 25002 K=J+1,3
  111. M(K,J)=M(J,K)
  112. MXINV(K,J)=MXINV(J,K)
  113. 25002 CONTINUE
  114. 25001 CONTINUE
  115. END$
  116. 4: 4:
  117. Quitting
  118. Sat Jun 29 14:11:15 PDT 1991