problem with imag command when evaluating symbolic expressions.
Ältere Kommentare anzeigen
Hi, when I execute the following code in Matlab
syms x y; f=4*i+9*x+y; imag(f)
I get the following result
ans =
(9*i*conj(x))/2 - (i*y)/2 - (9*i*x)/2 + (i*conj(y))/2 + 4
and the result should be 4 instead of what I get. I cannot figure out where have I gone wrong.Any ideas?
Thank you in advance.
Akzeptierte Antwort
Weitere Antworten (1)
Carlos
am 11 Feb. 2013
0 Stimmen
Kategorien
Mehr zu Symbolic Variables, Expressions, Functions, and Settings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!