axiom-math
[Top][All Lists]
Advanced

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

Re: [Axiom-math] Axiom: Printing multiple variables in axiom.


From: Constantine Frangos
Subject: Re: [Axiom-math] Axiom: Printing multiple variables in axiom.
Date: Sat, 10 Nov 2007 11:59:01 +0200

Thanks for the detailed response - much appreciated.

The clarifications on compatible axiom types for lhs/rhs of equations etc are 
most helpful.

output("Acon = ", Acon) is more straightforward.

I am using an axiom function definition testkinemat1 == 
in order to add function parameters later.

Regards,

C. Frangos.

On Saturday 10 November 2007 04:54, Bill Page wrote:
> On 11/8/07, Constantine Frangos <address@hidden> wrote:
> > In the function below, I tried to use the following commands
> >
> > )display value Acon
> > print(['Acon = Acon])
> >
> > to print one or more variable.
> >
> > However, I get very strange behaviour and error messages, so had to
> > comment them out. There might be a bug somwhere in my program.
> > ...
>
> What do you mean by "strange behaviour"? Do you mean for example the
> error message:
>
> (12) -> print('Aconnull = Aconnull)
>    There are 3 exposed and 0 unexposed library operations named
>       equation having 2 argument(s) but none was determined to be
>       applicable. Use HyperDoc Browse, or issue
>                             )display op equation
>       to learn more about the available operations. Perhaps
>       package-calling the operation or using coercions on the arguments
>       will allow you to apply the operation.
>
>    Cannot find a definition or applicable library operation named
>       equation with argument type(s)
>                               Variable Aconnull
>                        List Vector Expression Integer
>
>       Perhaps you should use "@" to indicate the required return type,
>       or "$" to specify which version of the function you need.
>
> ------
>
> This error should be expected since you are trying to produce an
> equation (which like everything in Axiom must have a type) between two
> things of quite different kind. I cannot think of any equation which
> has Variable on one side and List on the other. You might try to
> construct something of type:
>
>    Equation Polynomial Integer
>
> For example
>
> (1) -> x=1
>
>    (1)  x= 1
>                                 Type: Equation Polynomial Integer
>
> In this equation both sides of this equation can be considered Polynomials.
>
> In this case maybe you want to create an equation of type:
>
>   Equation List Vector Expression Integer
>
> Like this:
>
>   [['Aconnull]] = Aconnull
>
> Now the lefthand side can be interpreted as a 'List Vector Expression
> Integer' so the expression
>
>   print([['Aconnull]] = Aconnull)
>
> is ok.
>
> Maybe you should not be trying to create an equation just to print a
> result?
>
> Probably
>
>   output("Aconnull =", Aconnull)
>
> is more like you intended to do.
>
> The command
>
>   )display values
>
> is a command. As such it is not intended to be used inside of a
> function definition such as
>
> testkinemat1 ==
> --)read expandsincos.input
>  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],_
> ...
>
> as you wrote above. Why are you writing?
>
>   testkinemat1 ==
>
> This does not make sense to me in your code. Are you intending to use
> this name testkinemat1 for some purpose later? This is not the usual
> way in which one would use a definition like this. Perhaps you can
> explain what you really want to do with this code.
>
> If you forget about trying to define the function testkinemat1, then you
> can use
>
>   )display values
>
> in the normal way in the rest of you code because this is just a
> series of expressions and command to be evaluated. This works fine for
> me.
>
> Regards,
> Bill Page.

-- 
Constantine Frangos, Pr.Eng.
Professor
Dept. of Mathematics and Statistics
University of Johannesburg
Auckland Park Kingsway Campus
P O Box 524
Auckland Park 
Johannesburg 2006
South Africa

Tel: +27-11-559-2452
Fax: +27-11-559-2832
e-mail: address@hidden , address@hidden 





reply via email to

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