R2C {conformal}R Documentation

Real/complex manipulation

Description

Convert objects to a complex vector

Usage

R2C(ww)
listxy2C(x)
matrix2C(x)

Arguments

ww

A real vector representing alternating real/imaginary pairs or a complex vector

x

A list having two components or a matrix having two columns representing the real and imaginary parts of a complex vector

Value

a complex vector

Author(s)

Nick Ellis, nick.ellis@csiro.au

See Also

C2R, listxy2R, matrix2R

Examples

x <- 1:10
y <- 10:1
mat <- cbind(x,y)
lis <- list(x,y)
xy <- as.vector(t(mat))
z1 <- R2C(xy)
z2 <- listxy2C(lis)
z3 <- matrix2C(mat)
all(z1==z2)
all(z1==z3)

[Package conformal version 1.1 Index]