Description Usage Arguments Value Examples
Version of diag that has more consistent behavior
| 1 | 
| x | A vector, matrix or array with third mode length 1 | 
| len | numeric dimensions of new diagonal matrix to me made. Recycles values in x. | 
| ... | parameters passed to diag | 
if x is a vector or integer, return a matrix with x on the diagonal. If x is a matrix, or degenerate array, return the diagonal of x.
| 1 2 3 4 5 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.