Macaulay2 » Documentation
Packages » Macaulay2Doc :: reshape(Module,Module,Matrix)
next | previous | forward | backward | up | index | toc

reshape(Module,Module,Matrix) -- reshape a matrix

Synopsis

Description

Currently, it is assumed that f and the result both have the same number of entries. The resulting map has the same degree that f has, but it is easy to spoil homogeneity by giving incorrect free modules.
i1 : f = matrix{{1,3,5,7,9,11},{2,4,6,8,10,12}}

o1 = | 1 3 5 7 9  11 |
     | 2 4 6 8 10 12 |

              2        6
o1 : Matrix ZZ  <--- ZZ
i2 : reshape(ZZ^3,ZZ^4,f)

o2 = | 1 4 7 10 |
     | 2 5 8 11 |
     | 3 6 9 12 |

              3        4
o2 : Matrix ZZ  <--- ZZ

Ways to use this method: