axiom-math
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Axiom-math] (no subject)


From: cf
Subject: [Axiom-math] (no subject)
Date: Mon, 13 Dec 2004 13:11:58 +0200

12 November 2004

Dear Colleagues,

I have pasted below two files: expandsincos.input and testkinemat1.input. 

Any assistance with the following will be appreciated:


(1) I am trying to read expandsincos.input from within
    testkinemat1.input but this gives an error. Not clear why ??

(2) What worked is to execute from the command line:

    )read expandsincos.input
    )read testkinemat1.input

    However, there does not seem to be much simplification.

(3) I tried to write the script testkinemat1.input like a function
    without input or output variables (see below) but this gave
    errors. Not clear why ??

(4) Any examples of how to write user functions calling other user
    functions, etc would be much appreciated. Especially the case
    where a function can return multiple variables eg. in matlab: 

    [x1,x2,x3] = func1(y1,y2,y3);

    In view of the errors in (1), (3) above, its not clear how the "reading
in" of
    .input files should be done. 

(5) In axiom what is the instruction to "pause" after the execution of
    a line, and continue after hitting enter ? eg in matlab: 
    a = 1 
    pause; 
    b = 3 
    pause;



-- expandsincos.input
-- Basic trigonometric expansion rules for axiom.
--cos(2*x) == cos(x)**2 - sin(x)**2

expandsincos := rule ( sin(x+y) == sin(x)*cos(y) + sin(y)*cos(x); cos(x+y)
== cos(x)*cos(y) - sin(x)*sin(y); sin(2*x)  == 2*sin(x)*cos(x); cos(2*x) ==
cos(x)*cos(x) - sin(x)*sin(x));




--testkinemat1.input 

--testkinemat1() ==_ 

--)read expandsincos.input;

Acon := matrix([[1, 0, Lo2*cos(phi)+Lo1*sin(phi), -sin(delta1)*a,0,0,0],_
[0, 1, Lo2*sin(phi)-Lo1*cos(phi), a*cos(delta1), 0, 0, 0],_
[0,1, Lo2*sin(phi)+Lo1*cos(phi), 0, a*cos(delta1), 0, 0],_
[1, 0,-Lo2*cos(phi)+Lo1*sin(phi), 0, 0, -sin(delta2)*a, 0],_
[0, 1,-Lo2*sin(phi)-Lo1*cos(phi), 0, 0, a*cos(delta2), 0],_
[1, 0,-Lo2*cos(phi)-Lo1*sin(phi), 0, 0, 0, -sin(delta2)*a],_
[0, 1, -Lo2*sin(phi)+Lo1*cos(phi), 0, 0, 0, a*cos(delta2)]])

detAcon:=determinant(Acon)

--detAcon:=factor(detAcon)

detAcon:=expandsincos(detAcon)

detAcon:=simplify(detAcon)




Best regards,


C. Frangos.



------
Constantine Frangos.
Professor
Dept. of Mathematics and Statistics
Rand Afrikaans University
P O Box 524
Auckland Park 2006
South Africa

Tel: +27-11-489-2452
Fax: +27-11-489-2832
e-mail: address@hidden (work)
              address@hidden (home)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]