Question: Convert,unit_free: How to make it work with exp

For plotting with a plot function that has not been upgraded to units I want to remove units from the following

5.818576570*10^(-7)*exp(`–`((1.827959741*10^(-6))*(x^2+y^2)/Unit('`μm`')^2))/Unit('`μm`')^2

0.5818576570e-6*exp(-0.1827959741e-5*(x^2+y^2)/Units:-Unit(`μm`)^2)/Units:-Unit(`μm`)^2

(1)

convert(0.5818576570e-6*exp(-0.1827959741e-5*(x^2+y^2)/Units:-Unit(`μm`)^2)/Units:-Unit(`μm`)^2, unit_free)

0.5818576570e-6*exp((-0.1827959741e-5*x^2-0.1827959741e-5*y^2)*Units:-Unit(1/`μm`^2))

(2)

map(convert, 0.5818576570e-6*exp(-0.1827959741e-5*(x^2+y^2)/Units:-Unit(`μm`)^2)/Units:-Unit(`μm`)^2, unit_free)

0.5818576570e-6*exp((-0.1827959741e-5*x^2-0.1827959741e-5*y^2)*Units:-Unit(1/`μm`^2))

(3)

NULL


Anything else I could try with convert or something better than this

subs(Unit(1/'`μm`'^2) = 1, %)

I cannot conclude form the help page ?convert,unitfree if it should have worked on the expression.

Is the expression (1) non-scalar?

The term unit-free describes a scalar quantity with no (multiplicative) unit attached to it. Conversion to unit-free does not apply directly to any non-scalar Maple object or data structure, which may still have units embedded within it.

Download convert_unit_free_of_exp.mw

Please Wait...