Complex multiplication giving wrong answer
1 次查看(过去 30 天)
显示 更早的评论
I am trying to extract positive sequence currents using method of symmetrical components .However I am getting wrong answer. The following is my test code.
a=exp(i*2*pi/3)
P1=[1 a a^2]
%Balanced Voltages and Unbalanced Currents
Va=5*exp(j*53*pi/180);
Vb=7*exp(-j*164*pi/180);
Vc=7*exp(j*105*pi/180);
V1=(1/3)*P1*[Va Vb Vc]'
Va1=(1/3)*(Va+a*Vb+a^2*Vc)
Though V1 and Va1 should be same, I am getting different answers. Please tell me whats wrong in the calculation of V1 ( Va1 calculation method gives correct answer)
0 个评论
采纳的回答
Roger Stafford
2016-5-30
编辑:Stephen23
2016-5-30
The trouble lies in the line
V1=(1/3)*P1*[Va Vb Vc]'
You should have used this:
V1=(1/3)*P1*[Va Vb Vc].’
As you have written it, [Va Vb Vc]' not only takes the transpose of [Va Vb Vc], it also changes each element to its complex conjugate, which you don’t want in this example. Read about it at:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!