Manipulate real or imaginary components of an object

Im(x) <- value
Re(x) <- value

Arguments

x

Complex-valued object

value

Real-valued object

Author

Robin K. S. Hankin

Examples

x <- 1:10
Im(x) <- 1

x <- 1:5
Im(x) <- 1/x