[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Axiom-developer] Re: [Axiom-math] (no subject)
From: |
Vanuxem Grégory |
Subject: |
[Axiom-developer] Re: [Axiom-math] (no subject) |
Date: |
Fri, 17 Jun 2005 16:07:52 +0200 |
C.Frangos,
Le vendredi 17 juin 2005 à 15:03 +0200, C.Frangos a écrit :
> 17 June 2005
>
> Some time ago, I managed to get axiom running under suse linux 7.2 (graphics
> not working). Recently I downloaded the latest version and got it running
> under suse linux 9.2 (with working graphics) on another machine.
>
> I am trying to convert some of my Matlab m-files to axiom. Any
> assistance with the following will be much appreciated:
>
>
> (1) Is there a short way of declaring all variables in an axiom
> function to be local ?
>
> In Matlab this is automatically the case and global variables have
> to be specifically declared.
>
> In axiom it seems that its the opposite, creating the possibility
> of errors. Is this a design error in an otherwise very
> advanced language ?
>
> (2) In Matlab I have a main function (in an m-file) calling another
> function, which in turn calls another function etc. Its not clear
> from the axiom book how to implement this. Does one have to use
> )read fun1.input, )read fun2.input, ...etc, and then fun1(); ?
>
> Any papers, reports or tutorials on the details of axiom programming
> involving multiple functions defined in separate files, calling
> each other, etc as described above would be helpful.
>
> (3) Is there a setting in axiom to avoid having to use underscore _,
> to insert blank lines between program lines in files defining
> functions ? This seems awkward and error prone.
>
> (4) I am using the Matlab symbolic toolbox (Maple engine). Its not
> clear from the axiom book how to typecast a unit matrix (integer
> or float) to type expression or variable in order to add it to
> another matrix containing expressions in the variable/symbol x,
> for example: A:= I + matrixins;
May be this can help,
if it's not "mathematically correct", use data stucture operation,
(TwoDimensionalArray), in other words, you have to coerce yourself
matrix(INT) for example to Matrix(POLY INT))
(205) -> a
+99 5 5 +
| |
(205) |9 5 1 |
| |
+1 5 1 +
(206) -> map(i+->i*x,a)
+ 99x 5x 5x +
| |
(206) | 9x 5x x |
| |
+ x 5x x +
>
> (5) System commands like )read, etc don't seem to work within
> functions ?
>
> (6) Is there an axiom equivalent to Matlab's pause command ?
>
> (7) I tried using a list to return multiple variables from a
> function. However, this turns out to be of type any. These variables
> can be displayed but not used in operations any further. This means
> that you have to remember the types of each variable in the list.
> Then, manually in the calling function extract and explicitly
> typecast each variable in the returned list. Is there an easier
> way of doing this ??
>
> (8) Does the current axiom distribution with working graphics have to
> be recompiled on my older suse linux 7.2 machine (first one took
> about 12 hours) or can I somehow copy the directory of the latest
> axiom via ethernet from my newer suse linux 9.2 machine ?
>
> Regards,
>
> C. Frangos.
>