Maxima: display the list vertically

By default, Maxima displays lists horizontally:

(%i1) myList : [1,3,7]$
      myList;

(%o1) [1,3,7]

      

I work 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 these lists vertically. The way to achieve this result would be as follows:

(%i1) myList : [1,3,7]$
      transpose(myList);

(%o1) ⎡137
      

I could also display two lists vertically, one after the other:

(%i1) myList      : [1,3,7]$
      myOtherList : [6,2,4]$
      print(transpose(myList),transpose(myOtherList);

(%o1) ⎡1⎤ ⎡63⎥,⎢27⎦ ⎣4
      

As you can see, I have a working solution. However, it takes a lot of characters to enter and read. So my question is, is there a more elegant way to achieve a similar result?

+3


source to share


1 answer


One parameter: Define your own myprint

that takes a list of arguments to print, wraps elements that are matrices, and then prints the list.

Then you can write



myprint( [ myList, myOtherList ]);

      

+1


source







All Articles