Group Abstract Group Abstract

Message Boards Message Boards

0
|
5.6K Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

New Quantity func doesn't simplify and Constants hide value? How do I use?

Anonymous User
Anonymous User
Posted 8 years ago
POSTED BY: Anonymous User
2 Replies
Anonymous User
Anonymous User
Posted 8 years ago
In[4]:= % // UnitConvert

Out[4]= Quantity[6.674*10^-11, ("Kilograms" "Meters")/("Seconds")^2]

In[5]:= % // UnitSimplify

Out[5]= Quantity[6.674*10^-11, "Newtons"]

Thank you. i didn't even check UnitConvert because it's not a conversion (not what Convert[] did in 4.0 either). UnitSimplify[] was not in the See Also of help for Quantity[]. The overview didn't mention UnitSimplify (but I did miss finding the Unit guide page).

I really don't like the "1st generation" oob style solution, but at least it can be made to work.

POSTED BY: Anonymous User

In Mathematica 11.3 version:

 R = Quantity[1, "Meters"];
 m1 = Quantity[1, "Kilograms"];
 m2 = Quantity[1, "Kilograms"];
 G = Quantity[1, "GravitationalConstant"];

 (G*m1*m2)/R^2 // UnitConvert

Or:

 (G*m1*m2)/R^2 // UnitSimplify
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard