Hi Fabrizio, you wrote:
> Is there a command to convert
> a list of lists into a matrix?
Yes, you want the "apply" function.
"apply (f, [a, b, c])" is like calling "f(a, b, c)".
(%i1) l: [[a, b, c], [d, e, f]];
(%o1) [[a, b, c], [d, e, f]]
(%i2) apply (matrix, l);
[ a b c ]
(%o2) [ ]
[ d e f ]
> Or having a list [a_1, ... a_n],
> how can I apply this "list" to
> a function that takes as input
> an arbitrary length "sequence" a_1,...,a_n ,
> as for instance the function "matrix"?
I'm not sure I understand completely, but I believe "apply"
is what you want.
(%i1) apply (min, [2, -1, 3, 5]);
(%o1) - 1
(%i2) apply ("+", [a, b, c, d]);
(%o2) d + c + b + a
Hope this helps,
Robert Dodier
__________________________________
Do you Yahoo!?
All your favorites on one personal page Try My Yahoo!
http://my.yahoo.com