Quantcast
Viewing latest article 25
Browse Latest Browse All 186

Turn string with () as function brackets into expression

I have a text file with an equation where all the brackets are formatted as (). For example I read in the equation 2*(Re(a)+Im(b)) as a string. Now I am wondering if I can make this into an expression where mathematica correctly recognizes Re(a) and Im(b) as functions. In some sense I just have to change 2*(Re(a)+Im(b)) into 2*(Re[a]+Im[b]) but I am not sure if this is possible to do automatically.


Viewing latest article 25
Browse Latest Browse All 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>