Maxima: convert matrix to list

Grzegorz Wierzowiecki picture Grzegorz Wierzowiecki · Dec 31, 2011 · Viewed 7.1k times · Source

I convert list to matrix in Maxima in following way:

DataL : [ [1,2], [2,4], [3,6], [4,8] ];
DataM: apply('matrix,DataL);

How to do it the other way ? How to convert given matrix DataM into list DataL ?

Answer

Robert Dodier picture Robert Dodier · Sep 26, 2012

I know it's late in the game, but for what it's worth, there is a simpler way.

my_matrix : matrix ([a, b, c], [d, e, f]);
my_list : args (my_matrix);
 => [[a, b, c], [d, e, f]]