How to separate real and imaginary components from a given expression in Matlab?
Show older comments
Hello everyone I have a expression and I need to separate the real and imaginary components of the expression. I have written a simple code using symbolic math toolbox. The code is:
clc
syms X1 X2 XC RL
Zin=((X1*XC)-1i*(X2*RL))/(RL+1i*(X1*X2*XC));
A=real(Zin)
B=imag(Zin)
Can anyone please point out whats wrong with it or maybe another way to do this right.
Thank You.
Accepted Answer
More Answers (0)
Categories
Find more on Assumptions 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!