This is an old revision of the document!


Matrix

The object Matrix defines matrices, i.e. tables of tables, and defines the standard lua math operations (+,-,*,/,^) among other functionalities on them. When creating a table-table object in Lua one has to tell the language that this is supposed to be a matrix. This is done by setting the metatable MatrixMeta.

Example.Quanty
--This creates a table of tables
M = {{1,  14 },
     {33, 4.7}}
--This defines functionalities like addition or multiplication on M
setmetatable(M, MatrixMeta)

Table of contents

Print/export