I want to convert some symbolic computations from Maple to Julia/SymPy, specifically regarding the Park transformation.
Question: how do I use coefficients like sqrt(3/2) and make sure that these are preserved as exact numbers, instead of being converted to a Floting Point number?
Beautiful… I got the same results as in Maple, and with a simpler set-up :-).
Questions on subscripts with Julia/SymPy:
A final question… I’d like to use subscripts with variable names, if possible. I am able to produce \theta_a by \theta followed by TAB followed by \_a and then TAB.
But if I try with subscripts b and c, \_b doesn’t produce b as subscript, but instead expands to \_beta and then produces \theta_\beta. Likewise, \_c expands to \_chi and then produces \theta_\chi.
Is it possible to have multiple symbols in subscript? I’d like to have something like R_\mathrm{dq0}… or should I instead use Rdq0 or R_dq0?
For electric machines, the phases are normally referred to as a, b, c, so I would need to use subscripts with a, b and c to make it elegant – as in \theta_a, \theta_b, \theta_c. Anyway, I can live with the less elegant \theta a, \theta b, \theta c.
Aha. OK, I’ll have to wait for an update of Unicode.
I did find that choosing label names like R_a etc. in SymPy expressions actually is shown as R_a in the Out-cell of Jupyter notebooks, so this partially solves my problem. Currently my word processor choice (LyX) doesn’t support Unicode in program listing anyway — I’ll experiment more on that in the next version of the word processor.