# isdiag

Determines if the input is a diagonal matrix.

## Syntax

R = isdiag(x)

## Inputs

`x`- Type: any input

## Outputs

- R
- A logical 1 when
`x`is a diagonal matrix, and 0 otherwise.

## Example

Simple isdiag example:

`R = isdiag(eye(10))`

`R = 1`

Determines if the input is a diagonal matrix.

R = isdiag(x)

`x`- Type: any input

- R
- A logical 1 when
`x`is a diagonal matrix, and 0 otherwise.

Simple isdiag example:

`R = isdiag(eye(10))`

`R = 1`