C. Frangos
2007-10-27 12:26:57 UTC
26 October 2007
Thanks very much to Bill Page, Time Daly, Francois Maltey and Waldeck Hebisch
for carefully going through my programming example below some time ago
and suggesting corrections.
Any assistance with the following would be appreciated:
(1) It would be very helpful if somebody could email me
basic programming examples in axiom demonstrating the
usage of the underscore _ at end of lines in combination with
basic programming constructs like nested for ...to... loops,
repeat ...until..., while...do..., if ,...then...else..., etc.
(I prefer the underscore to piles).
(2) In Matlab, there is a pause function which halts program execution
until any key is pressed. How can I construct a function in axiom
to do the same thing ??
(3) How can an expression be displayed as x1*cos(x2)+........, instead
of x1 cos(x2) +..... ??
(4) Are there accessible mathematical references that
clearly explain the theory of rings, categories, etc, and the relationship
with axiom rings, domains, categories etc ? (I have the axiom book and Tim
Daly's book).
(5) I uncommented the line
--testkinemat1() ==_
in the script below, in order to create a function from the script. However,
I get an error when I try to run the function from the command line.
(6) Are there additional simplification functions (user packages, etc
?) other than simplify() for expressions with complicated
trigonometric terms ?
(7) I want to mainly use local variables in function definitions. How are
local variables declared or defined in functions ??
TIA,
C. Frangos.
--testkinemat1() ==_
Acon := matrix([[1 , 0 , Lo1*sin(phi) , -sin(phi)*a , 0 , 0 , 0 , 0 , 0],_
[0 , 1 , -Lo1*cos(phi) , a*cos(phi) , 0 , 0 , 0 , 0 , 0],_
[1 , 0 , -Lo1*sin(phi) , 0 , -a*sin(phi), 0 , 0 , 0 , 0],_
[0 , 1 , Lo1*cos(phi) , 0 , a*cos(phi) , 0 , 0 , 0 , 0],_
[1,0,-Lc*cos(phi)+Lo1*sin(phi),0,0,0,-a*sin(phi)*cos(delta3)_
-a*cos(phi)*sin(delta3),0,0],_
[0,1,-Lc*sin(phi)-Lo1*cos(phi),0,0,0,a*cos(phi)*cos(delta3)_
-a*sin(phi)*sin(delta3),0,0],_
[1,0,-Lc*cos(phi)-Lo1*sin(phi),0,0,(-2*sin(phi)*Lo1*sin(delta3)-sin(phi)*_
Lc*cos(delta3)-cos(phi)*Lc*sin(delta3))*a/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0,1,-Lc*sin(phi)+Lo1*cos(phi),0,0,a*(2*cos(phi)*Lo1*sin(delta3)+_
cos(phi)*Lc*cos(delta3)-sin(phi)*Lc*sin(delta3))/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , -k]])
Acon := simplify(Acon)
rankAcon := rank(Acon)
Acone := rowEchelon(Acon)
Aconnull := nullSpace(Acon)
nullity := nullity(Acon)
Thanks very much to Bill Page, Time Daly, Francois Maltey and Waldeck Hebisch
for carefully going through my programming example below some time ago
and suggesting corrections.
Any assistance with the following would be appreciated:
(1) It would be very helpful if somebody could email me
basic programming examples in axiom demonstrating the
usage of the underscore _ at end of lines in combination with
basic programming constructs like nested for ...to... loops,
repeat ...until..., while...do..., if ,...then...else..., etc.
(I prefer the underscore to piles).
(2) In Matlab, there is a pause function which halts program execution
until any key is pressed. How can I construct a function in axiom
to do the same thing ??
(3) How can an expression be displayed as x1*cos(x2)+........, instead
of x1 cos(x2) +..... ??
(4) Are there accessible mathematical references that
clearly explain the theory of rings, categories, etc, and the relationship
with axiom rings, domains, categories etc ? (I have the axiom book and Tim
Daly's book).
(5) I uncommented the line
--testkinemat1() ==_
in the script below, in order to create a function from the script. However,
I get an error when I try to run the function from the command line.
(6) Are there additional simplification functions (user packages, etc
?) other than simplify() for expressions with complicated
trigonometric terms ?
(7) I want to mainly use local variables in function definitions. How are
local variables declared or defined in functions ??
TIA,
C. Frangos.
--testkinemat1() ==_
Acon := matrix([[1 , 0 , Lo1*sin(phi) , -sin(phi)*a , 0 , 0 , 0 , 0 , 0],_
[0 , 1 , -Lo1*cos(phi) , a*cos(phi) , 0 , 0 , 0 , 0 , 0],_
[1 , 0 , -Lo1*sin(phi) , 0 , -a*sin(phi), 0 , 0 , 0 , 0],_
[0 , 1 , Lo1*cos(phi) , 0 , a*cos(phi) , 0 , 0 , 0 , 0],_
[1,0,-Lc*cos(phi)+Lo1*sin(phi),0,0,0,-a*sin(phi)*cos(delta3)_
-a*cos(phi)*sin(delta3),0,0],_
[0,1,-Lc*sin(phi)-Lo1*cos(phi),0,0,0,a*cos(phi)*cos(delta3)_
-a*sin(phi)*sin(delta3),0,0],_
[1,0,-Lc*cos(phi)-Lo1*sin(phi),0,0,(-2*sin(phi)*Lo1*sin(delta3)-sin(phi)*_
Lc*cos(delta3)-cos(phi)*Lc*sin(delta3))*a/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0,1,-Lc*sin(phi)+Lo1*cos(phi),0,0,a*(2*cos(phi)*Lo1*sin(delta3)+_
cos(phi)*Lc*cos(delta3)-sin(phi)*Lc*sin(delta3))/sqrt(4*Lo1^2*sin(delta3)^2+_
4*Lo1*sin(delta3)*Lc*cos(delta3)+Lc^2*cos(delta3)^2+Lc^2*sin(delta3)^2),0,0,0],_
[0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , -k]])
Acon := simplify(Acon)
rankAcon := rank(Acon)
Acone := rowEchelon(Acon)
Aconnull := nullSpace(Acon)
nullity := nullity(Acon)