Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:language_reference:objects:matrix:operations:mul [2024/12/12 14:28] – created Maurits W. Haverkort | documentation:language_reference:objects:matrix:operations:mul [2025/11/20 04:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ### | ### | ||
| - | alligned paragraph text | + | You can multiply matrices with numbers or with other matrices. The latter is implemented as matrix multiplication |
| ### | ### | ||
| ===== Example ===== | ===== Example ===== | ||
| - | ### | ||
| - | description text | ||
| - | ### | ||
| ==== Input ==== | ==== Input ==== | ||
| <code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
| - | -- some example code | + | A = Matrix.New({{1, |
| + | B = Matrix.New({{1, | ||
| + | C = A*B | ||
| + | D = 2*B | ||
| + | E = B*2 | ||
| + | |||
| + | print(C) | ||
| + | print(D) | ||
| + | print(E) | ||
| </ | </ | ||
| ==== Result ==== | ==== Result ==== | ||
| <file Quanty_Output> | <file Quanty_Output> | ||
| - | text produced as output | + | { { 7 , 10 } , |
| + | { 15 , | ||
| + | { 23 , | ||
| + | |||
| + | { { 2 , 4 } , | ||
| + | { 6 , 8 } } | ||
| + | |||
| + | { { 2 , 4 } , | ||
| + | { 6 , 8 } } | ||
| </ | </ | ||
| ===== Table of contents ===== | ===== Table of contents ===== | ||
| - | {{indexmenu> | + | {{indexmenu> |