Multiplying matrices with values in polar form
29 次查看(过去 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!