# isdiag

Determines if the input is a diagonal matrix.

R = isdiag(x)

x
Type: any input

## Outputs

R
A logical 1 when x is a diagonal matrix, and 0 otherwise.
Type: Boolean

## Example

Simple isdiag example:

R = isdiag(eye(10))
R = 1