How to separate real and imaginary value into different column?

조회 수: 31 (최근 30일)
Faheem Ur Rehman
Faheem Ur Rehman 2021년 5월 27일
댓글: Torsten 2023년 11월 15일
I have .mat file which contain 1024 values and i want to keep them in two columns and remove the i.
For example a+bi
and i need a and b in which i does't include.
I have uploaded the .mat file.

채택된 답변

Torsten
Torsten 2021년 5월 27일
A = [real(v),imag(v)];
if v is the column vector with 1024 complex numbers.

추가 답변 (1개)

Gayatri
Gayatri 2023년 11월 15일
I have a .dat file contains complex number.i need to separate real and imaginary values.
For example -0.6-0.9*i
I need to separate o.6 and 0.9 without i
can anyone help?
  댓글 수: 1
Torsten
Torsten 2023년 11월 15일
z = -0.6-0.9*1i
z = -0.6000 - 0.9000i
real_part_of_z = real(z)
real_part_of_z = -0.6000
imaginary_part_of_z = imag(z)
imaginary_part_of_z = -0.9000

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

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by