Symbolic complex number manipulation
조회 수: 6 (최근 30일)
이전 댓글 표시
Is there a way to put a fraction of complex number in standard form with the symbolics toolbox? After getting it in standard form simplify to then extract the imaginary part? And lastly, setting the imaginary part equal to zero and solving for a variable?
for example:
Z=(A+1i*B)/(C+1i*D)
%%should give the following in closer to standard form, not done automatically
Z2=(A+B*1j)*(C-D*1j)/(C^2+D^2)
%%trying to simplify
Z3=collect(Z2,1i)
%%this command should give the imaginary part, but just marks in the equation imaginary and real.
Z3imag=imag(Z3)
댓글 수: 0
답변 (1개)
Walter Roberson
2018년 3월 7일
syms A B C D real
and then do your steps. This gives (B*C - A*D)/(C^2 + D^2) as the result.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!