%% Complex Matrix
% Create a matrix containing complex numbers, and determine if its rows are in ascending order based on the real parts of the elements in the first column.  Since the elements in the first column have equal real parts, issortedrows then checks the imaginary parts to break the tie.

A = [1+i 2i; 1+2i 3+4i]
TF = issortedrows(A,'ComparisonMethod','real')

% Copyright 2012 The MathWorks, Inc.