%% Test Complex Numbers
% Create a vector of complex numbers.

A = [1+i 2-2i 1+3i 1-2i 5-i];

%
% Find the values that are less than 3.

A(A < 3)

% lt compares only the real part of the elements in A.
%
% Use abs to find which elements are within a radius of 3 from the origin.

A(abs(A) < 3)

% The result has one less element. The element 1.0000 + 3.0000i is not within a radius of 3 from the origin.
% Copyright 2012 The MathWorks, Inc.