Stacks of matrix columns in Maxima

I want matrix column stacks in Maxima.

Example

b3: matrix( [1,0,0], [-a21,1,0], [-a31,-a32,1] ); 

I wonder how to stack the columns of this matrix. Thanks in advance for your help and time.

+4
source share
2 answers

Here is a naive way to do this:

 c : transpose( b3 ); transpose( append( c[0], c[1], c[2] ) ); 

and here is a more general way:

 apply(append, map(lambda([r], transpose(b3)[r]), makelist(i,i,3))); 
+3
source

Or even just:

 transpose(apply(append,args(transpose(b3)))); 
+2
source

Source: https://habr.com/ru/post/1411645/


All Articles