Message Boards Message Boards

0
|
6849 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

Why are Quantity and Unit Convert giving answers in different units?

Posted 11 years ago

In[1]:= Quantity[Quantity[7200, "Seconds"], "Hours"]

Out[1]= Quantity[2, ("Hours")^2]

In[2]:= UnitConvert[Quantity[7200, "Seconds"], "Hours"]

Out[2]= Quantity[2, "Hours"]

v Mathematica 9.0.1

Attachments:
POSTED BY: A Doshi

Well, Quantity[Quantity[7200, "Seconds"], "Hours"] is a bit strange as input. Usually, you'll want to make the first argument dimensionless. Note that value Quantity[unit] is the same as Quantity[value, unit], so your result makes perfect sense.

POSTED BY: John Doty
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract