|MATLAB Function Reference|
Construct complex data from real and imaginary components
c = complex(a,b)
creates a complex output,
c, from the two real inputs.
The output is the same size as the inputs, which must be scalars or equally sized vectors, matrices, or multi-dimensional arrays.
The following describes when
b can have different data types, and the resulting data type of the output
bhas an integer data type, the other must have the same integer data type or type scalar
chas the same integer data type.
c = complex(a) for real
a returns the complex result
c with real part
0 as the value of all imaginary components. Even though the value of all imaginary components is
c is complex and
isreal(c) returns false.
complex function provides a useful substitute for expressions such as
in cases when the names "
i" and "
j" may be used for other variables (and do not equal ), when
b are not
double, or when
b is all zero.
uint8 vector from two real
© 1994-2005 The MathWorks, Inc.