next up previous contents
Next: REAL Real Function Up: Elementary Functions Previous: VAR Variance Function   Contents

Subsections

CONJ Conjugate Function

Usage

Returns the complex conjugate of the input array for all elements. The general syntax for its use is

   y = conj(x)

where x is an n-dimensional array of numerical type. The output is the same numerical type as the input. The conj function does nothing to real and integer types.

Example

The following demonstrates the complex conjugate applied to a complex scalar.

--> conj(3+4*i)
ans = 
  <complex>  - size: [1 1]
    3.0000000        -4.0000000     i

The conj function has no effect on real arguments:

--> conj([2,3,4])
ans = 
  <int32>  - size: [1 3]
 
Columns 1 to 3
             2              3              4

For a double-precision complex array,

--> conj([2.0+3.0*i,i])
ans = 
  <dcomplex>  - size: [1 2]
 
Columns 1 to 1
    2.000000000000000       -3.000000000000000    i  
 
Columns 2 to 2
    0.000000000000000       -1.000000000000000    i



Samit K. Basu 2005-03-16