how can i obtain just the real part instead of immaginary part ?

2 visualizzazioni (ultimi 30 giorni)
i want just the real part from these vlaues
knowng that
Name Size Bytes Class Attributes
Vpsim 51x500 408000 double complex
1.3252 + 0.0000i 1.4465 + 0.0000i 1.4043 + 0.0000i
1.3300 + 0.0000i 1.2834 + 0.0000i 1.4307 + 0.0000i
1.3310 + 0.0000i 1.3500 + 0.0000i 1.3947 + 0.0000i
1.3313 + 0.0000i 1.2473 + 0.0000i 1.3757 + 0.0000i
1.2713 + 0.0000i 1.0426 + 0.0000i 1.3731 + 0.0000i
0.9120 + 0.0000i 1.3442 + 0.0000i 1.3818 + 0.0000i

Risposte (1)

Dave B
Dave B il 14 Nov 2021
The functions real and imag pull out the real and imaginary parts:
X = sqrt(-rand(3))+rand(3)
X =
0.8163 + 0.4712i 0.7445 + 0.6770i 0.7423 + 0.8525i 0.2628 + 0.6231i 0.1585 + 0.6913i 0.2367 + 0.7967i 0.7158 + 0.7837i 0.9413 + 0.9009i 0.0461 + 0.8458i
R = real(X)
R = 3×3
0.8163 0.7445 0.7423 0.2628 0.1585 0.2367 0.7158 0.9413 0.0461
I = imag(X)
I = 3×3
0.4712 0.6770 0.8525 0.6231 0.6913 0.7967 0.7837 0.9009 0.8458
  5 Commenti
RADWAN A F ZEYADI
RADWAN A F ZEYADI il 14 Nov 2021
yes my code contain also function after i called it i got this error its defficult to provide all the code because contain a function
Dave B
Dave B il 14 Nov 2021
This warning can mean lots of different things depending on the context. A singular matrix is one that has a determinant of 0, but my guess is you're using a higher level function that depends on a non-singular matrix to do some math.

Accedi per commentare.

Categorie

Scopri di più su Linear Algebra in Help Center e File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by