Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16198 > unrolled thread
| Started by | Itai Seggev <itais@wolfram.com> |
|---|---|
| First post | 2013-11-08 20:51 +0000 |
| Last post | 2013-11-08 20:51 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Unit conversion of a list of quantities Itai Seggev <itais@wolfram.com> - 2013-11-08 20:51 +0000
| From | Itai Seggev <itais@wolfram.com> |
|---|---|
| Date | 2013-11-08 20:51 +0000 |
| Subject | Re: Unit conversion of a list of quantities |
| Message-ID | <l5jit9$lpg$1@smc.vnet.net> |
On Thu, Nov 07, 2013 at 12:28:37AM -0500, mariusz sapinski wrote:
> I have the following lists:
> Edep = {4.9491200000000017`*^-14 Joules,
> 1.8669264000000004`*^-14 Joules, 6.223088000000001`*^-15 Joules}
> mass = {0.043937500000000004` g, 0.06987` g, 0.02329` g}
>
> I want to calculate dose:
> dose = Edep/mass
>
> I get another list (of Quantities):
>
> {(1.1264*10^-12 Joules)/g, (2.672*10^-13 Joules)/g, (
> 2.672*10^-13 Joules)/g}
>
> OK, but I want to have Grays, ie. Joules/kg:
>
> UnitConvert[dose, "Joules/kg"]
>
> Unfortunately output is not what I want:
> {UnitConvert[(1.1264*10^-12 Joules)/g, "Joules/kg"],
> UnitConvert[(2.672*10^-13 Joules)/g, "Joules/kg"],
> UnitConvert[(2.672*10^-13 Joules)/g, "Joules/kg"]}
>
>
> How to get Mathematica to convert J/g to J/kg?
> Mathematica 9.0.1 on linux.
>
> Regards, Mariusz
Why not just convert to Grays?
In[23]:= Quantity[5, "Joules"/"Grams"];
In[24]:= UnitConvert[%, "Grays"]
Out[24]= Quantity[5000, "Grays"]
If you wish to convert to J/Kg, you must use correct syntax:
In[25]:= UnitConvert[%, "Joules"/"Kilograms"]
Out[25]= Quantity[5000, ("Joules")/("Kilograms")]
--
Itai Seggev
Mathematica Algorithms R&D
217-398-0700
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web