no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | documentation:language_reference:objects:matrix:start [2018/09/25 11:32] – Added mentioning of MatrixMeta Simon Heinze | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{indexmenu_n> | ||
+ | ====== 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. | ||
+ | |||
+ | |||
+ | <code Quanty 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, | ||
+ | |||
+ | </ | ||
+ | ### | ||
+ | |||
+ | |||
+ | ===== Table of contents ===== | ||
+ | {{indexmenu> | ||