The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Inactive » comp.soft-sys.math.mathematica

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Quantity
Replies: 1   Last Post: Sep 26, 2013 3:45 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Sseziwa Mukasa

Posts: 108
Registered: 8/26/07
Re: Quantity
Posted: Sep 26, 2013 3:45 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

The question now being asked:

> Is there a method to create a list of unit strings
> known to the kernel, i.e., those that would not involve a query
> to Wolfram Alpha?

is a little different than the original question, which was what are the possible units. I don't think it's too difficult although perhaps tedious to answer the new question: download the list from NIST, turn off the computer's internet connection, restart Mathematica (to clear any cached values, otherwise I'm not so sure how to do that) and then test whether Mathematica understands all the units from the NIST list.

On Sep 25, 2013, at 2:35 AM, Bill Rowe <> wrote:

> On 9/24/13 at 4:16 AM, (Itai Seggev) wrote:

>> On Sun, Sep 22, 2013 at 02:47:41AM -0400, Bill Rowe wrote:
>>> There does not seem to be a specific set of unit strings. Note that
>>> doing:

>>> In[1]:= UnitConvert[Quantity[12., "Feet"], "Meters"]
>>> Out[1]= 3.6576 m
>>> returns a result essentially immediately. But doing
>>> In[2]:= UnitConvert[Quantity[12., "Foot"], "Meters"]
>>> Out[2]= 3.6576 m
>>> returns the same result after a small delay. You should see a brief
>>> message indicating Mathematica is interpreting the units. I believe
>>> what is happening here is Mathematica is using Wolfram Alpha to
>>> interpret the unit string which increases the allowable number of
>>> unit strings significantly and makes it essentially impossible for
>>> a user to create a list of allowable unit strings.

>> I'm not sure if you are complaining about or praising the
>> flexibility of input,

> Neither. I was simply trying to show why it would be difficult
> to enumerate a specific list of units Mathematica can utilize.

>> but you can always see the canonical unit name
>> by looking at the InputForm.

>> In[3]:= Quantity[5, "Foot"]//InputForm
>> Out[3]//InputForm=Quantity[5, "Feet"]

> True. But this doesn't really answer the original poster's
> question. Is there a method to create a list of unit strings
> known to the kernel, i.e., those that would not involve a query
> to Wolfram Alpha?

>> You can also turn off internet connectivity in the preferences if
>> you don't want Quantity to try to interpret units for you by asking
>> W|A.

> I am happy with Mathematica asking Wolfram Alpha. That generally
> makes my life simpler. But I can also see why it might be nice
> to have a list of unit strings Mathematica will work with
> without asking Wolfram Alpha.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.