Read-only forum archive

Printing matrices

Printing matrices

anonymity · Sun Mar 05, 2006 9:20 am

When I use the print() function on matrices, I get representatives for the entries whenever the output width is too long. For example, if I print a 1x3 matrix, I might get "_[1,1],_[1,2],_[1,3]" instead of the actual polynomial entries. Is there a way to turn off this behavior?

Re: Printing matrices

G.-M. Greuel · Mon Mar 06, 2006 9:59 pm

anonymity wrote:
When I use the print() function on matrices, I get representatives for the entries whenever the output width is too long. For example, if I print a 1x3 matrix, I might get "_[1,1],_[1,2],_[1,3]" instead of the actual polynomial entries. Is there a way to turn off this behavior?


There are two methods:
If the name of the matrix is M just type M;
Then you get all entries in full length but as a list and not in matrix form.
You may use pmat(M,[n]);
pmat() is a procedure from inout.lib which shows M in matrix form and
which is more flexible than print().