필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2021년 11월 14일
댓글: Dave B 2021년 11월 14일
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

답변 (1개)

Dave B
Dave B 2021년 11월 14일
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
RADWAN A F ZEYADI
RADWAN A F ZEYADI 2021년 11월 14일
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 2021년 11월 14일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by