I've got a String variable defined as b="4.0 \cdot 10^{-5}"
, which is clearly written as LaTeX input.
The problem is that when I want to obtain the expression from it using c=ToExpression[b,TeXForm]
, I get the following output:
4.\[CenterDot]1/100000
.
To avoid that problem, I tried first doing b=StringReplace[b," \cdot " -> "*"]
but, if I do that, then the output of the other line of code gets senseless:
9.76563*10^(-9)
Is there another way to deal with this problem with \cdot
?
(4.0*10)^{-5}
. $\endgroup$Is there another way to deal with this problem with \cdot?
it is better to go back to the source to fix the problem there. What sympy expression did you have that generated\cdot
as its Latex translation? $\endgroup$