3

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 ?

Gael Lorieul
  • 3,006
  • 4
  • 25
  • 50

1 Answers1

2

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 ]);
soegaard
  • 30,661
  • 4
  • 57
  • 106