## Units for lab writeups

Biology, Earth/Space Science, Chemistry, Physics, Computer Science, etc.
Forum Rules
By using the Wolfram Faculty Program Forum, you agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, or sexually oriented material. Wolfram Faculty Program Forum administrators have the right to remove, edit, move or close any topic at any time should we see fit.

Personal Information: Posts in this forum may be viewed by non-members; however, the forum prohibits non-members from viewing your profile. Although your email address is hidden from both non-members and members, your account is initially configured to allow members to contact you via email through the forum. If you wish to hide your profile, or prohibit others from contacting you directly, you may change these settings by updating your profile through the User Control Panel.

Attachments: Attachments are not currently enabled on this forum. To share a file with others on this site, simply upload your file to the online storage service of your choice and include a link to the file within your post. If your school does not offer an online file storage and sharing service, the following sites provide free basic online file storage and sharing: Mozy, FilesAnywhere, Adrive, and KeepandShare.

### Units for lab writeups

It's really important for kids doing labs to have units. I have questions about how to put units with numbers and then be able to do calculations with those variables.

For example:

molesAl = 0.631 g ((1 mol)/(massAl g))

0.0233864 mol

molesS = (1.750 g - 0.631 g) ((1 mol)/(massS g))

0.0348979 mol

moleratio = Max[{molesAl, molesS}]/Min[{molesAl, molesS}]

and I want this number to be a unitless ratio...

Max[0.0233864 mol, 0.0348979 mol]/Min[0.0233864 mol, 0.0348979 mol]

gotwals

Posts: 2
Joined: Tue Mar 02, 2010 9:49 pm
Organization: NCSSM
Department: Chemistry

### Re: Units for lab writeups

Robert_Gotwals wrote:It's really important for kids doing labs to have units. I have questions about how to put units with numbers and then be able to do calculations with those variables.

For example:

molesAl = 0.631 g ((1 mol)/(massAl g))

0.0233864 mol

molesS = (1.750 g - 0.631 g) ((1 mol)/(massS g))

0.0348979 mol

moleratio = Max[{molesAl, molesS}]/Min[{molesAl, molesS}]

and I want this number to be a unitless ratio...

Max[0.0233864 mol, 0.0348979 mol]/Min[0.0233864 mol, 0.0348979 mol]

Hi Robert,

You can use the Units Package for this, which is built into Mathematica. The following loads the Units Package.

<< Units`

mol can be represented as Mole
g can be representaed as Gram

Here's a tutorial on using the Units Package:
http://reference.wolfram.com/mathematic ... Units.html

Let me know if I can be of further assistance.

-Kathy
Katherine Bautista
Wolfram Research, Inc.
http://www.wolfram.com

Kathy_Bautista