iscplx#

Purpose#

Returns whether a matrix or N-dimensional array is complex or real.

Format#

x_iscplx = iscplx(x)#
Parameters:

x (NxK matrix or N-dimensional array) – data

Returns:

x_iscplx (scalar) – 1 if x is complex, 0 if it is real.

Examples#

// Define x
x = { 1, 2i, 3 };

// Test if x is complex
if iscplx(x);
   print "X is complex";
else;
   print "X is not complex";
endif;

See also

Functions hasimag(), iscplxf()