how to find real&imagenery part of complecs symbolic expression ?

1 回表示 (過去 30 日間)
tomer polsky
tomer polsky 2019 年 6 月 5 日
コメント済み: KALYAN ACHARJYA 2019 年 6 月 5 日
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 ?

採用された回答

KALYAN ACHARJYA
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
  2 件のコメント
tomer polsky
tomer polsky 2019 年 6 月 5 日
thank you very much!
KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 6 月 5 日
Welcome @Tomer

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by