Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:language_reference:objects:matrix:functions:diagonal [2018/09/25 12:11] – created Simon Heinze | documentation:language_reference:objects:matrix:functions:diagonal [2024/12/12 16:53] (current) – Maurits W. Haverkort | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ### | ### | ||
| Matrix.Diagonal($\{x_1, | Matrix.Diagonal($\{x_1, | ||
| + | |||
| + | If the option " | ||
| ### | ### | ||
| ===== Example ===== | ===== Example ===== | ||
| - | |||
| - | ### | ||
| - | The day may come on which this documentation page has an example. | ||
| - | ### | ||
| ==== Input ==== | ==== Input ==== | ||
| <code Quanty Example.Quanty> | <code Quanty Example.Quanty> | ||
| - | -- some example code | + | xlist = {17,3,-4*I, sqrt(6)} |
| + | M = Matrix.Diagonal(xlist) | ||
| + | print(M) | ||
| </ | </ | ||
| ==== Result ==== | ==== Result ==== | ||
| <file Quanty_Output> | <file Quanty_Output> | ||
| - | text produced as output | + | { { 17 , 0 , 0 , 0 } , |
| + | { 0 , 3 , 0 , 0 } , | ||
| + | { 0 , 0 , (-0 - 4 I) , 0 } , | ||
| + | { 0 , 0 , 0 , 2.4494897427832 } } | ||
| </ | </ | ||
| ===== Table of contents ===== | ===== Table of contents ===== | ||
| - | {{indexmenu> | + | {{indexmenu> |