| Library: | xplore |
| See also: | diag |
| Quantlet: | xdiag | |
| Description: | Extracts diagonal elements from matrices. |
| Usage: | d = xdiag (x) | |
| Input: | ||
| x | n x n x d1 x d2 ... array of quadratic matrices | |
| Output: | ||
| d | n x 1 x d1 x d2 ... array of diagonal elements | |
library("xplore")
xdiag (diag (1:4))
Contents of d [1,] 1 [2,] 2 [3,] 3 [4,] 4
| Library: | xplore |
| See also: | diag |