Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:language_reference:objects:matrix:start [2018/09/25 11:32] – Added mentioning of MatrixMeta Simon Heinze | documentation:language_reference:objects:matrix:start [2024/12/12 14:07] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 3: | Line 3: | ||
### | ### | ||
- | The object Matrix defines matrices, i.e. tables of tables, and defines the standard lua math operations | + | The object Matrix defines matrices. |
+ | ### | ||
+ | ### | ||
+ | Matrices can be created from tables of tables by setting the meta table of the table to MatrixMeta | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | --This creates a table of tables | + | M = {{1,2},{3,4}} |
- | M = {{1, | + | |
- | {33, 4.7}} | + | |
- | --This defines functionalities like addition or multiplication on M | + | |
setmetatable(M, | setmetatable(M, | ||
+ | </ | ||
+ | Matrices can be created as a user data with the function Matrix.New | ||
+ | <code Quanty Example.Quanty> | ||
+ | M = Matrix.New( {{1, | ||
</ | </ | ||
### | ### | ||
+ | ### | ||
+ | Below you can find a list of possible functions and operations one can perform on matrices | ||
+ | ### | ||
===== Table of contents ===== | ===== Table of contents ===== | ||
- | {{indexmenu> | + | {{indexmenu> |