If there is a standard way to do this, I can't think of it. This
might work:
(%i3) mat : matrix([1,2],[3,4]);
(%o3) matrix([1,2],[3,4])
(%i9) load(linearalgebra)$
(%i10) :lisp(maxima-to-array $mat);
#2A((1 2) (3 4))
It's poor practice to use non user level functions. This is especially
true when they are in /share and not /src. Such functions might change
or be expunged without notice.
Also, Maxima's support for CL arrays is full of bugs, I think. So be
careful
with that too. Before you get carried away, try searching the bug list for
things like use_fast_arrays.
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To: "maxima at math.utexas.edu" <maxima at math.utexas.edu>
>From: "Kun Lin " <klin at umd.edu>
>Sent by: maxima-bounces at math.utexas.edu
>Date: 01/26/2008 10:11AM
>Subject: converting to 2-d list or array
>
>Hi all,
>
> In maxima a 2X2 matrix
> [1 2]
> [3 4]
>is represented as (($matrix simp)
> ((mlist simp) 1 2)
> (mlist simp) 3 4))
>
>how do i covert it into a 2-d array or a nested list( is there an
>exisiting function that does this?)
>
>like #2A((1 2) (3 4)) or '((1 2) (3 4)) ?
>
>- Kun
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima