Main Content

conj

Complex conjugate

Description

example

Zc = conj(Z) returns the complex conjugate of each element in Z.

Examples

collapse all

Find the complex conjugate of the complex number Z.

Z = 2+3i
Z = 2.0000 + 3.0000i
Zc = conj(Z)
Zc = 2.0000 - 3.0000i

Create a 2-by-2 matrix with complex elements.

Z = [0-1i 2+1i; 4+2i 0-2i]
Z = 2×2 complex

   0.0000 - 1.0000i   2.0000 + 1.0000i
   4.0000 + 2.0000i   0.0000 - 2.0000i

Find the complex conjugate of each complex number in matrix Z.

Zc = conj(Z)
Zc = 2×2 complex

   0.0000 + 1.0000i   2.0000 - 1.0000i
   4.0000 - 2.0000i   0.0000 + 2.0000i

Input Arguments

collapse all

Input array, specified as a scalar, vector, matrix, or multidimensional array. conj operates element-wise when Z is nonscalar.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

GPU Code Generation
Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.

Version History

Introduced before R2006a

See Also

| | | | |