Quantcast
Channel: Active questions tagged units - Mathematica Stack Exchange
Viewing all articles
Browse latest Browse all 41

Convert units to String

$
0
0

Is there a way to convert compound units to string?For example, I have "Newtons"/"Meters"^2, how to I convert it to "N/m^2"?I know If I do the following

QuantityForm[QuantityUnit[Quantity[1, "Newtons"/ "Meters"^2]], "Abbreviation"]

It will give me "N"/("m")^2, but not "N/m^2".

p.s. The reason I want to do this is that I am writing a function that will copy quantities to excel. After copying units are not displaying correctly


Viewing all articles
Browse latest Browse all 41

Trending Articles



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