Multiplying matrices with values in polar form
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Luccas S.
el 11 de Ag. de 2021
Comentada: Luccas S.
el 14 de Ag. de 2021
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 comentarios
Respuesta aceptada
DGM
el 12 de Ag. de 2021
Editada: DGM
el 12 de Ag. de 2021
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Create Fixed-Point Objects in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!