next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
FourTiTwo :: putMatrix

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-18520-0/0
i3 : F = openOut(s)

o3 = /tmp/M2-18520-0/0

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

o5 = /tmp/M2-18520-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 :