By default, Maxima displays lists "horizontally" :
(%i1) myList : [1,3,7]$
myList;
(%o1) [1,3,7]
I am working with lists containing very few atoms, but each atom takes up a lot of space when displayed. Therefore it would be more convenient to display those lists vertically. A way to achieve that result would be the following :
(%i1) myList : [1,3,7]$
transpose(myList);
(%o1) ⎡1⎤
⎢3⎥
⎣7⎦
I might also want to display two lists vertically, one after the other :
(%i1) myList : [1,3,7]$
myOtherList : [6,2,4]$
print(transpose(myList),transpose(myOtherList);
(%o1) ⎡1⎤ ⎡6⎤
⎢3⎥,⎢2⎥
⎣7⎦ ⎣4⎥
As you can see I have a working solution. However, it takes a lot of characters to type & read. Hence my question : is there a more elegant way to achieve a similar result ?
One option: Define your own myprint that accepts a list of arguments to print, transposes the elements, that are matrices, and then prints the list.
Then you can write
myprint( [ myList, myOtherList ]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With