Multiplying matrices with values in polar form
37 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
DGM
2021 年 8 月 12 日
編集済み: 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)
I0 = p2r(I0)
F = [1 1 1; 1 a^2 a; 1 a a^2];
ICC = F*[I0; I0; I0] % answer in rect form
ICCp = [abs(ICC) angle(ICC)/pi*180] % convert to phasor in degrees
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.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!