Cartesian to polar matrix
27 views (last 30 days)
Show older comments
Hello,
There is a matrix ;
Ybus=
x1+y1j x2+y2j x3+y3j x4+y4j
Our code should convert polar form;
Result=
x1angle x2 angle x3 angle x4 angle
Can you help us ,please?
0 Comments
Answers (2)
Bhaskar R
on 23 Nov 2019
If Ybus = [x + iy] then
[angle_Ybus, rho_Ybus] = cart2pol(real(Ybus), imag(Ybus));
see the more details in https://in.mathworks.com/help/matlab/ref/cart2pol.html
2 Comments
Bhaskar R
on 25 Nov 2019
Ybus = [ 20-j*50 -10+j*20 -10+j*30
-10+j*20 26-j*52 -16+j*32
-10+j*30 -16+j*32 26-j*62];
[angle_Ybus, rho_Ybus] = cart2pol(real(Ybus), imag(Ybus));
D = rad2deg(angle_Ybus);
% initialize Result with zeros
Result = zeros(size(rho_Ybus, 1), 2*size(rho_Ybus, 2));
% place rho values in alternative column
Result(:,1:2:end) = rho_Ybus;
% place D values in alternative column
Result(:,2:2:end) = D;
% Result is your required matrix
See Also
Categories
Find more on Polar Plots 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!