-
Notifications
You must be signed in to change notification settings - Fork 439
L_1cd
Joris Gillis edited this page Apr 4, 2023
·
2 revisions
Get the diagonal of a matrix or construct a diagonal.::
diag(DM A) -> DM diag(SX A) -> SX diag(MX A) -> MXWhen the input is square, the diagonal elements are returned. If the input is vector-like, a diagonal matrix is constructed with it.
To edit, see writing tips.