How to perform complex calculation in matlab

67 Ansichten (letzte 30 Tage)
Jb179
Jb179 am 4 Dez. 2017
Beantwortet: Walter Roberson am 4 Dez. 2017
How would I go about performing calculations using complex numbers? Below is the equation I'm trying to implement
E = V + X*I
Where V = 1 , X = 2j and I = 25 at an angle of 10. I want to be able to do it in terms of the variables since V, X and I are user inputs

Antworten (2)

KSSV
KSSV am 4 Dez. 2017
Representing complex numbers in matlab is easy and straight forward. Read more here: https://in.mathworks.com/help/matlab/complex-numbers.html
z = 1 + 3*1i ; % make a complex number
R = real(z) % Extract real part of Z
I = imag(z) % Extract imaginary part of Z
A = abs(z) ; % GEt absolute of complex number

Walter Roberson
Walter Roberson am 4 Dez. 2017
V = 1;
X = 2j;
I = 25;
E = V + X .* I;
If the user is expected to input X without the 'j' part then just
V = 1;
X = 2;
I = 25;
E = V + X*1j .* I;

Kategorien

Mehr zu Elementary Math finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by