change magnitude and phase angle to vector

3 views (last 30 days)
If Voltage Magitude = [1;2;3;4;5] and Phase angle is [ 0; -22; -0.5; -2; -4] (degrees)
How can I get V vector using MatLab code?

Accepted Answer

Star Strider
Star Strider on 23 Jun 2021
Try this —
Mag = [1;2;3;4;5]; % V
Phase = [ 0; -22; -0.5; -2; -4]; % Degrees
Complex_Voltage = Mag.*(cosd(Phase) + 1j*sind(Phase))
ComplexVoltage =
1.0000 + 0.0000i 1.8544 - 0.7492i 2.9999 - 0.0262i 3.9976 - 0.1396i 4.9878 - 0.3488i
.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!