# Multiplying matrices with values ​​in polar form

16 ビュー (過去 30 日間)
Luccas S. 2021 年 8 月 11 日
コメント済み: Luccas S. 2021 年 8 月 14 日
Hello, I'm trying to perform the following operation (Image). I did the operation in complex form in matlab and it worked, but I would like to know how to make it in polar form so I don't need to convert all the values.
a = 1 ∠ 120
I0 = I1 = I2 = 1.7478 ∠ - 90
I was using the following function to multiply complex numbers:
function [ sum ] = pmult( x,y )
A=x(1).*y(1);
B=x(2)+y(2);
sum=[A B];
end
I tried to use it in the matrix, but it was not successful.

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

### 採用された回答

DGM 2021 年 8 月 12 日

It's been a long time since I did this, but here goes:
% note that phasors in polar form are not scalar
% a complex number in rectangular form can be a scalar!
% if you're going to do matrix algebra with the numbers,
% they really need to be in rectangular form in order to fit
a = [1 120];
I0 = [1.7478 -90];
% define a conversion function, convert to rectangular form
% you could also use pol2cart(), but you'd also need to convert to radians
p2r = @(x) x(1).*cosd(x(2)) + x(1).*sind(x(2))*1j;
a = p2r(a)
a = -0.5000 + 0.8660i
I0 = p2r(I0)
I0 = 0.0000 - 1.7478i
F = [1 1 1; 1 a^2 a; 1 a a^2];
ICC = F*[I0; I0; I0] % answer in rect form
ICC =
0.0000 - 5.2434i 0.0000 - 0.0000i 0.0000 - 0.0000i
ICCp = [abs(ICC) angle(ICC)/pi*180] % convert to phasor in degrees
ICCp = 3×2
5.2434 -90.0000 0.0000 -90.0000 0.0000 -90.0000
Note that this last conversion only works neatly if ICC is a column vector, since ICCp needs to have twice as many columns as ICC.
##### 1 件のコメント表示非表示 なし
Luccas S. 2021 年 8 月 14 日
nice, thank you very much !

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

### カテゴリ

Find more on Graphics Object Programming in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by