<?xml version="1.0" encoding="utf-8" ?> <!-- for emacs: -*- coding: utf-8 -*- --> <!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html --> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head><title>reshape(Module,Module,Matrix) -- reshape a matrix</title> <link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/> </head> <body> <table class="buttons"> <tr> <td><div><a href="___Resolution.html">next</a> | <a href="___Rerun__Examples.html">previous</a> | <a href="___Resolution.html">forward</a> | <a href="___Rerun__Examples.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div> </td> </tr> </table> <hr/> <div><h1>reshape(Module,Module,Matrix) -- reshape a matrix</h1> <div class="single"><h2>Synopsis</h2> <ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>reshape(F,G,f)</tt></div> </dd></dl> </div> </li> <li><span>Function: <a href="_reshape_lp__Module_cm__Module_cm__Matrix_rp.html" title="reshape a matrix">reshape</a></span></li> <li><div class="single">Inputs:<ul><li><span><tt>F</tt>, <span>a <a href="___Module.html">module</a></span>, a free module</span></li> <li><span><tt>G</tt>, <span>a <a href="___Module.html">module</a></span>, a free module</span></li> <li><span><tt>f</tt>, <span>a <a href="___Matrix.html">matrix</a></span></span></li> </ul> </div> </li> <li><div class="single">Outputs:<ul><li><span><span>a <a href="___Matrix.html">matrix</a></span>, <tt>F <-- G</tt> obtained from f by taking elements from the first column of <tt>f</tt>, then the second, and so on, filling them into the result column by column.</span></li> </ul> </div> </li> </ul> </div> <div class="single"><h2>Description</h2> <div>Currently, it is assumed that <tt>f</tt> and the result both have the same number of entries. The resulting map is always of degree zero.<table class="examples"><tr><td><pre>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</pre> </td></tr> <tr><td><pre>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</pre> </td></tr> </table> </div> </div> </div> </body> </html>