Translating Maxima functions.



On 10/18/2011 11:15 AM, Panagiotis Papasotiriou wrote:
> I'll try what you suggested, copy the input list to a local array. Question
> is... How do I mode_declare a local variable which is an array of floats?

the link I gave has the manual pages for the "functions and variables
for arrays" here's the direct link to the section

http://maxima.sourceforge.net/docs/manual/en/maxima_5.html#SEC25

it turns out since your array is internal to your algorithm, you are
better off with an "unnamed" array using "make_array" function

as an example

f(x) := block([temp:make_array(flonum,length(x))],
/* creates a local unnamed array of floating point numbers and stores it
in the local variable temp*/
for i:1 thru length(x) do (
temp[i]: float(x[1]), x:rest(x)),
/* fills the array with numbers and eats the list x */
temp); /* returns temp */

Hope this helps give you an idea of how to use arrays.

Dan