Write a complex number in polar form

282 ビュー (過去 30 日間)
Luccas S.
Luccas S. 2021 年 7 月 23 日
コメント済み: Star Strider 2021 年 7 月 23 日
Hello,I would like to know how do I write a complex number in its polar form. Like the image below.
Mycode:
Soperacao = (0.8*250*0.746e3)/(0.87*0.85)
IloadM1 = Soperacao/(sqrt(3)*2.4e3);
IloadM1angle = rad2deg(acos(0.85));
IloadM1 = [IloadM1 IloadM1angle] % is not working, in this way
Iload = IloadM1/(600/(sqrt(3)*2.4))
re = abs(Iload);
thetae = angle(Iload);
Icc3phi_angulo = rad2deg(thetae);
fprintf('Iload = %0.4f /__ %0.2f\n', re, Icc3phi_angulo)
The operation, i want to do:

採用された回答

Star Strider
Star Strider 2021 年 7 月 23 日
The ‘image below’ is slightly difficult to read, however the code to do that is easy to write. This is called phasor notation.
phasorr = @(z) [abs(z) angle(z)];
phasord = @(z) [abs(z) rad2deg(angle(z))];
Z = [5 + 1j*2; 5 - 1j*2]
Z =
5.0000 + 2.0000i 5.0000 - 2.0000i
prad = phasorr(Z)
prad = 2×2
5.3852 0.3805 5.3852 -0.3805
pdeg = phasord(Z)
pdeg = 2×2
5.3852 21.8014 5.3852 -21.8014
Check = [prad(:,1) .* exp(1j*prad(:,2))]
Check =
5.0000 + 2.0000i 5.0000 - 2.0000i
And it works!
.
  2 件のコメント
Luccas S.
Luccas S. 2021 年 7 月 23 日
It worked, thank you !!
Star Strider
Star Strider 2021 年 7 月 23 日
As always, my pleasure!
.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by