I am trying to get rid of terms with 0., $x+0.I$ for example.
I've found this question: A dot appearing after a zero, and making the entries of a matrix into fractions and the solution is using Chop
.
However, some terms that I want to keep are very small, $10^{-14}$, and also neglect with Chop
too.
As I looked on the internet, I can't find the solution for this question. If it is duplicate, please let me know.
Thanks.
Chop
suit your needs? $\endgroup$Re
. $\endgroup$Re
gives me Re(...). Then, I useRefine
but imaginary parts still exists, Re(n1+n2*I)x y. Finally, I useConjugate
to get rid of imaginary parts and then I get this problem. $\endgroup$Chop
. It's my mistake. However, @mikado's answer can solve this problem too. $\endgroup$