istriu

Checks if matrix is diagonal.

📝 Syntax

  • tf = isdiag(M)

📥 Input argument

  • M - a numeric array

📤 Output argument

  • tf - logical: result of 'isdiag'.

📄 Description

isdiag returns an scalar logical if entry is diag.

💡 Example

A = eye(3, 3);
R = isdiag(A)
R = isdiag(A(:,1))

🔗 See also

istriu, istril.

🕔 History

Version
📄 Description

1.0.0

initial version

Last updated

Was this helpful?