Message Boards Message Boards


Avoid trouble using: "UnitConvert & CompatibleUnitQ"?

Posted 4 years ago
2 Replies
1 Total Likes

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

2 Replies
Posted 4 years ago

By the way I am using Mathematica 11.2 Thanks!

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.


Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract