

last edited 10 years ago 
1  
Editor: 127.0.0.1
Time: 2007/11/15 20:14:03 GMT8 

Note: transferred from axiomdeveloper 
changed:  Assume that I have a 'List', like: \begin{axiom} L := [[ 1,3, 3,1],[3, 6,3],[ 3,3],[1]] \end{axiom} (which is calculated from some earlier expressions). How can I convert it into a 'SquareMatrix'. \begin{axiom} L2:=[concat([L.i.j for j in 1..#L.i],[0 for j in ((#L.i)+1)..#L]) for i in 1..#L] \end{axiom} Namely I want to have a matrix like: \begin{axiom} A := matrix L2 \end{axiom} so that I can do \begin{axiom} vp := vector[p0,p1,p2,p3] \end{axiom} and \begin{axiom} vp * A \end{axiom}
Assume that I have a List
, like:
L := [[ 1,3,  3, 1], [3,  6, 3], [ 3, 3], [1]]
(1) 
(which is calculated from some earlier expressions).
How can I convert it into a SquareMatrix
.
L2:=[concat([L.i.j for j in 1..#L.i],[0 for j in ((#L.i)+1)..#L]) for i in 1..#L]
(2) 
Namely I want to have a matrix like:
A := matrix L2
(3) 
so that I can do
vp := vector[p0,p1, p2, p3]
(4) 
and
vp * A
(5) 