Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maxima: convert matrix to list

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 ?

like image 427
Grzegorz Wierzowiecki Avatar asked Dec 31 '11 15:12

Grzegorz Wierzowiecki


People also ask

How matrix is defined in Maxima?

If n is equal to m , Maxima prompts for the type of the matrix (diagonal, symmetric, antisymmetric, or general) and for each element. Each response is terminated by a semicolon ; or dollar sign $ . If n is not equal to m , Maxima prompts for each element. The elements may be any expressions, which are evaluated.

How do you multiply matrices in Maxima?

Matrix multiplication is represented by the noncommutative multiplication operator . . The corresponding noncommutative exponentiation operator is ^^ . For a matrix A , A . A = A ^^2 and A ^^-1 is the inverse of A , if it exists.


1 Answers

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]]
like image 147
Robert Dodier Avatar answered Oct 20 '22 04:10

Robert Dodier