Macaulay2 » Documentation
Packages » FourTiTwo :: putMatrix
next | previous | forward | backward | up | index | toc

putMatrix -- writes a matrix into a file formatted for 4ti2

Synopsis

Description

Write the matrix A in file F in 4ti2 format.

i1 : A = matrix "1,1,1,1; 1,2,3,4"

o1 = | 1 1 1 1 |
     | 1 2 3 4 |

              2       4
o1 : Matrix ZZ  <-- ZZ
i2 : s = temporaryFileName()

o2 = /tmp/M2-2568424-0/0
i3 : F = openOut(s)

o3 = /tmp/M2-2568424-0/0

o3 : File
i4 : putMatrix(F,A)
i5 : close(F)

o5 = /tmp/M2-2568424-0/0

o5 : File
i6 : getMatrix(s)

o6 = | 1 1 1 1 |
     | 1 2 3 4 |

              2       4
o6 : Matrix ZZ  <-- ZZ

See also

Ways to use putMatrix:

For the programmer

The object putMatrix is a method function.