%% Test if Matrix Is Skew-Hermitian
% Create a 3-by-3 matrix.

A = [-1i -1 1-i;1 -1i -1;-1-i 1 -1i]

% The matrix has pure imaginary numbers on the main diagonal.
%
% Specify skewOption as 'skew' to determine whether the matrix is skew-Hermitian.

tf = ishermitian(A,'skew')

% The matrix, A, is skew-Hermitian since it is equal to the negation of its complex conjugate transpose, -A'.
% Copyright 2012 The MathWorks, Inc.