Learn R Programming

complex (version 1.0.0)

clog: Functions that transform real and imaginary parts of a complex variable

Description

Function clog() will take logarithm of real and imaginary parts separately and then merge the resulting variable in the complex one. The function cexp() does the opposite transform, taking exponent of parts and then merging them.

Usage

clog(y, base = exp(1))

cexp(y, base = exp(1))

Value

A vector of the same size as y, containing transformed complex variable.

Arguments

y

vector of a complex variable in the original scale.

base

a positive or complex number: the base with respect to which logarithms/powers are computed. Defaults to exp(1).

Author

Ivan Svetunkov, ivan@svetunkov.ru

References

  • Svetunkov, S. & Svetunkov I. (2022) Complex Autoregressions. In Press.

See Also

cscale

Examples

Run this code

# Generate random complex variables
y <- complex(real=rnorm(100,100,10), imaginary=rnorm(100,100,10))

yLog <- clog(y)
cexp(yLog)

Run the code above in your browser using DataLab