How to perform complex calculation in matlab
조회 수: 66 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (2개)
KSSV
2017년 12월 4일
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
댓글 수: 0
Walter Roberson
2017년 12월 4일
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;
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!