Determine if matrix is diagonal - MATLAB isdiag

This MATLAB function returns logical 1 (true) if A is a diagonal matrix; otherwise, it returns logical 0 (false).