Message Boards Message Boards

0
|
5432 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Avoid trouble using: "UnitConvert & CompatibleUnitQ"?

Posted 6 years ago

I saw the FAQ on this website and was still not successful in getting to work (graphic attached) I am trying to use these two functions to convert things like: nautical miles to kilograms,radians to degrees or even pounds to kilograms. Any and all help is greatly appreciated! Best, PhillipWhat I see on my computer

POSTED BY: ssbm675
2 Replies

This works for me. Try quitting your Kernel -- you must have something defined that is interfering.

In[184]:= UnitConvert[Quantity[6.2, "NauticalMiles"], "Kilometers"]

Out[184]= Quantity[11.4824, "Kilometers"]

In your second example, you can't type "8.2 lb" -- you must use Quantity[]. MMA interprets 8.2 lb as "the number 8.2 multiplied by the variable lb" -- it is not a unit.

Regards

POSTED BY: Neil Singer
Posted 6 years ago

By the way I am using Mathematica 11.2 Thanks!

POSTED BY: ssbm675
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