This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Real and Imaginary parts of a complex vector

Tags: None
(comma "," separated)
trrrigo
Registered Member
Posts
13
Karma
0
Hi,
I have a complex vector V.
Is it possible to split V in to vectors Vr and Vi?
With Vr containing the real part of the coefficients of V and Vi the imaginary part:
V=Vr+ i*Vi
Thanks
manuels
Registered Member
Posts
47
Karma
0
Are you looking for
Code: Select all
Vr = V.real();
Vi = V.imag();
?
jitseniesen
Registered Member
Posts
204
Karma
2
Use V.real() and V.imag() . You can use them both for reading and writing, so you can write expressions like "U.imag() = V.imag()" to copy the imaginary part of V to U.
trrrigo
Registered Member
Posts
13
Karma
0
thanks that what i was looking for


Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], Google [Bot], rblackwell