how to find real&imagenery part of complecs symbolic expression ?
1 次查看(过去 30 天)
显示 更早的评论
lets say i want to get real &imegenry part of symbolic complex expression . so I wrote this simple code :
clc;clear all;
syms a b
H=a*i+b
real_H=real(H)
how ever the answer is not correct ,is there and other way ?
0 个评论
采纳的回答
KALYAN ACHARJYA
2019-6-5
编辑:KALYAN ACHARJYA
2019-6-5
syms a b real
%.........^
H=a*i+b;
real_H=real(H)
imag_H=imag(H)
Output:
real_H =
b
imag_H =
a
更多回答(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!