%% Determine Whether Complex Number Is Integer Type
% Determine if a complex number is an integer type.

A = 3.5 - 2.5i
TF = isinteger(A)

% MATLAB stores a complex number as a double type by default.
% Convert the complex number into a signed 32-bit integer type using the int32 function. Check if it is an integer type.

B = int32(A)
TF = isinteger(B)

% When a number with decimal digits is converted to an integer type, MATLAB rounds it to the nearest integer.
%
% Copyright 2018 The MathWorks, Inc.