Loading [MathJax]/jax/output/CommonHTML/jax.js

This is an old revision of the document!


Diagonal

Matrix.Diagonal({x1,x2,...,xn}) takes a list of n numbers and returns an n×n diagonal matrix with the xi as entries.

If the option “Userdata” is set to true (default is false) the output is returned as a pointer rather than a table of tables (compare Matrix.ToUserdata()).

Example

The day may come on which this documentation page has an example.

Input

Example.Quanty
-- some example code

Result

text produced as output

Table of contents

Print/export