Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
documentation:language_reference:objects:matrix:operations:pow [2024/12/12 14:28] – created Maurits W. Haverkort | documentation:language_reference:objects:matrix:operations:pow [2024/12/12 15:37] (current) – Maurits W. Haverkort | ||
---|---|---|---|
Line 3: | Line 3: | ||
### | ### | ||
- | alligned paragraph text | + | We can calculate matrix to the power of an integer |
### | ### | ||
===== Example ===== | ===== Example ===== | ||
- | |||
- | ### | ||
- | description text | ||
- | ### | ||
==== Input ==== | ==== Input ==== | ||
<code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
- | -- some example code | + | A = Matrix.New({{1, |
+ | B = A^2 | ||
+ | print(B) | ||
+ | print(B==A*A) | ||
+ | C = A^3 | ||
+ | print(C) | ||
+ | print(C==A*A*A) | ||
</ | </ | ||
==== Result ==== | ==== Result ==== | ||
<file Quanty_Output> | <file Quanty_Output> | ||
- | text produced as output | + | { { 7 , 10 } , |
+ | { 15 , | ||
+ | |||
+ | true | ||
+ | { { 37 , | ||
+ | { 81 , | ||
+ | |||
+ | true | ||
</ | </ | ||
===== Table of contents ===== | ===== Table of contents ===== | ||
- | {{indexmenu> | + | {{indexmenu> |