How to separate real and imaginary value into different column?

86 ビュー (過去 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 Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by