Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12856 > unrolled thread

Terrible unit trouble in Mathematic 9

Started bytio540s1@gmail.com
First post2012-12-18 07:35 +0000
Last post2012-12-23 12:08 +0000
Articles 8 — 6 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Terrible unit trouble in Mathematic 9 tio540s1@gmail.com - 2012-12-18 07:35 +0000
    Re: Terrible unit trouble in Mathematic 9 David Reiss <dbreiss@gmail.com> - 2012-12-19 09:55 +0000
      Re: Terrible unit trouble in Mathematic 9 jsheinwald <jsheinwald@comcast.net> - 2012-12-21 10:37 +0000
      Re: Terrible unit trouble in Mathematic 9 Murray Eisenberg <murray@math.umass.edu> - 2012-12-22 10:01 +0000
      Re: Terrible unit trouble in Mathematic 9 dr DanW <dmaxwarren@gmail.com> - 2012-12-23 12:08 +0000
      Re: Terrible unit trouble in Mathematic 9 Murray Eisenberg <murray@math.umass.edu> - 2012-12-23 18:15 +0000
    Re: Terrible unit trouble in Mathematic 9 Bob Hanlon <hanlonr357@gmail.com> - 2012-12-22 10:01 +0000
    Terrible unit trouble in Mathematic 9 dr DanW <dmaxwarren@gmail.com> - 2012-12-23 12:08 +0000

#12856 — Terrible unit trouble in Mathematic 9

Fromtio540s1@gmail.com
Date2012-12-18 07:35 +0000
SubjectTerrible unit trouble in Mathematic 9
Message-ID<kap6c4$469$1@smc.vnet.net>
I continue to receive "Unable to interpret unit specification m/s" (for example, but almost anything I attempt returns this message) with input:
UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combination of quotes, omitted quotes, etc. Even the prediction/suggestion box, when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens when I select "Convert" in the prediction box yields the same "unable to interpret unit specification.

What the heck????

[toc] | [next] | [standalone]


#12874

FromDavid Reiss <dbreiss@gmail.com>
Date2012-12-19 09:55 +0000
Message-ID<kas2v5$ci1$1@smc.vnet.net>
In reply to#12856
You need to get both the syntax right as well as the names of the
units (which are strings).  E.g.,

UnitConvert[Quantity[55 , "Miles"/"Hours"],
Quantity["Meters"/"Seconds"]]

Go back and spend a bit of time reviewing the documentation and
working through the examples for the functions that are contained in
the documentation....  ;-)

--David


On Dec 18, 2:35 am, tio54...@gmail.com wrote:
> I continue to receive "Unable to interpret unit specification m/s" (for e=
xample, but almost anything I attempt returns this message) with input:
> UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combi=
nation of quotes, omitted quotes, etc. Even the prediction/suggestion box, =
when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type =
in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens whe=
n I select "Convert" in the prediction box yields the same "unable to inter=
pret unit specification.
>
> What the heck????

[toc] | [prev] | [next] | [standalone]


#12902

Fromjsheinwald <jsheinwald@comcast.net>
Date2012-12-21 10:37 +0000
Message-ID<kb1e63$out$1@smc.vnet.net>
In reply to#12874
One problem with the UnitConvert command in Mathematica 9 is that it is not consistent.



In[7]:= a = UnitConvert[Quantity[55, "Miles"/"Hours"], Quantity["Meters"/"Seconds"]]

Out[7]= Quantity[96800/3937, ("Meters")/("Seconds")]

Works.  But so does:


In[8]:= b = UnitConvert[Quantity[78, "Centimeters"/"Seconds"], "Inches"/"Minutes"]

Out[8]= Quantity[234000/127, ("Inches")/("Minutes")]

This, as expected works:


In[9]:= c = UnitConvert[Quantity[0.6, "Radians"], Quantity["Degrees"]]

Out[9]= Quantity[34.3775, "AngularDegrees"]

But this does not:


In[10]:= d = UnitConvert[Quantity[0.81, "Radians"], "Degrees"]

During evaluation of In[10]:= UnitConvert::unkunit: Unable to interpret unit specification Degrees. >>

Out[10]= UnitConvert[Quantity[0.81, "Radians"], "Degrees"]

There are some serious consistency problems with the way unit conversions are implemented in Mathematica 9.  The examples in the help files could use some improvement too.






On Wednesday, December 19, 2012 4:55:49 AM UTC-5, David Reiss wrote:
> You need to get both the syntax right as well as the names of the
> 
> units (which are strings).  E.g.,
> 
> 
> 
> UnitConvert[Quantity[55 , "Miles"/"Hours"],
> 
> Quantity["Meters"/"Seconds"]]
> 
> 
> 
> Go back and spend a bit of time reviewing the documentation and
> 
> working through the examples for the functions that are contained in
> 
> the documentation....  ;-)
> 
> 
> 
> --David
> 
> 
> 
> 
> 
> On Dec 18, 2:35 am, tio54...@gmail.com wrote:
> 
> > I continue to receive "Unable to interpret unit specification m/s" (for example, but almost anything I attempt returns this message) with input:
> 
> > UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combination of quotes, omitted quotes, etc. Even the prediction/suggestion box,  
> when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens when I select "Convert" in the prediction box yields the same "unable to inter=
> 
> pret unit specification.
> 
> >
> 
> > What the heck????

[toc] | [prev] | [next] | [standalone]


#12918

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-12-22 10:01 +0000
Message-ID<kb40dk$kl$1@smc.vnet.net>
In reply to#12874
This definitely seems to be an oversight (i.e., minor bug). What does work is:

  UnitConvert[Quantity[0.81, "Radians"], Quantity[1, "Degrees"]]

And, curiously, the following works:

  UnitConvert[Quantity[0.81, "Radians"], "Grads"]

(but the corresponding expression with "Mils" instead of "Grads" does not).

On Dec 21, 2012, at 5:39 AM, jsheinwald <jsheinwald@comcast.net> wrote:

> One problem with the UnitConvert command in Mathematica 9 is that it is not consistent.
>
>
>
> In[7]:= a = UnitConvert[Quantity[55, "Miles"/"Hours"], Quantity["Meters"/"Seconds"]]
>
> Out[7]= Quantity[96800/3937, ("Meters")/("Seconds")]
>
> Works.  But so does:
>
>
> In[8]:= b = UnitConvert[Quantity[78, "Centimeters"/"Seconds"], "Inches"/"Minutes"]
>
> Out[8]= Quantity[234000/127, ("Inches")/("Minutes")]
>
> This, as expected works:
>
>
> In[9]:= c = UnitConvert[Quantity[0.6, "Radians"], Quantity["Degrees"]]
>
> Out[9]= Quantity[34.3775, "AngularDegrees"]
>
> But this does not:
>
>
> In[10]:= d = UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>
> During evaluation of In[10]:= UnitConvert::unkunit: Unable to interpret unit specification Degrees. >>
>
> Out[10]= UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>
> There are some serious consistency problems with the way unit conversions are implemented in Mathematica 9.  The examples in the help files could use some improvement too.
>
>
>
>
>
>
> On Wednesday, December 19, 2012 4:55:49 AM UTC-5, David Reiss wrote:
>> You need to get both the syntax right as well as the names of the
>>
>> units (which are strings).  E.g.,
>>
>>
>>
>> UnitConvert[Quantity[55 , "Miles"/"Hours"],
>>
>> Quantity["Meters"/"Seconds"]]
>>
>>
>>
>> Go back and spend a bit of time reviewing the documentation and
>>
>> working through the examples for the functions that are contained in
>>
>> the documentation....  ;-)
>>
>>
>>
>> --David
>>
>>
>>
>>
>>
>> On Dec 18, 2:35 am, tio54...@gmail.com wrote:
>>
>>> I continue to receive "Unable to interpret unit specification m/s" (for example, but almost anything I attempt returns this message) with input:
>>
>>> UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combination of quotes, omitted quotes, etc. Even the prediction/suggestion box, 
>> when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens when I select "Convert" in the prediction box yields the same "unable to interpret unit specification.
>>
>>>
>>
>>> What the heck????
>

---
Murray Eisenberg                                    murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305





[toc] | [prev] | [next] | [standalone]


#12928

Fromdr DanW <dmaxwarren@gmail.com>
Date2012-12-23 12:08 +0000
Message-ID<kb6s86$23k$1@smc.vnet.net>
In reply to#12874
"Mils" is recognized as a unit of distance equal to 0.001 inch, so cannot convert to angular measure.

Daniel

[toc] | [prev] | [next] | [standalone]


#12930

FromMurray Eisenberg <murray@math.umass.edu>
Date2012-12-23 18:15 +0000
Message-ID<kb7hnq$3mq$1@smc.vnet.net>
In reply to#12874
Thanks to Bob Hanlon, in a different post, using WolframAlpha to 
discover that one wants to use "AngularDegrees". That makes sense -- to 
disambiguate from "degrees" measuring temperature, I suppose.

Similar discovery reveals that you can get mils as a unit too, namely: 
"AngularMilsNIST". And that, evidently, to distinguish it from the unit 
of length (one thousandth of an inch).

There are so many units! No wonder Wolfram decided on the new model for 
units, using Quantity. Not as simple as all the old built-in symbols, 
since now we have text strings to name the units, but that seems the 
price to pay for so greatly extending the range of units allowed.


On Dec 22, 2012, at 5:01 AM, Murray Eisenberg <murray@math.umass.edu> wrote:

> This definitely seems to be an oversight (i.e., minor bug). What does work is:
>
>  UnitConvert[Quantity[0.81, "Radians"], Quantity[1, "Degrees"]]
>
> And, curiously, the following works:
>
>  UnitConvert[Quantity[0.81, "Radians"], "Grads"]
>
> (but the corresponding expression with "Mils" instead of "Grads" does not).
>
> On Dec 21, 2012, at 5:39 AM, jsheinwald <jsheinwald@comcast.net> wrote:
>
>> One problem with the UnitConvert command in Mathematica 9 is that it is not consistent.
>>
>>
>>
>> In[7]:= a = UnitConvert[Quantity[55, "Miles"/"Hours"], Quantity["Meters"/"Seconds"]]
>>
>> Out[7]= Quantity[96800/3937, ("Meters")/("Seconds")]
>>
>> Works.  But so does:
>>
>>
>> In[8]:= b = UnitConvert[Quantity[78, "Centimeters"/"Seconds"], "Inches"/"Minutes"]
>>
>> Out[8]= Quantity[234000/127, ("Inches")/("Minutes")]
>>
>> This, as expected works:
>>
>>
>> In[9]:= c = UnitConvert[Quantity[0.6, "Radians"], Quantity["Degrees"]]
>>
>> Out[9]= Quantity[34.3775, "AngularDegrees"]
>>
>> But this does not:
>>
>>
>> In[10]:= d = UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>>
>> During evaluation of In[10]:= UnitConvert::unkunit: Unable to interpret unit specification Degrees. >>
>>
>> Out[10]= UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>>
>> There are some serious consistency problems with the way unit conversions are implemented in Mathematica 9.  The examples in the help files could use some improvement too.
>>
>>
>>
>>
>>
>>
>> On Wednesday, December 19, 2012 4:55:49 AM UTC-5, David Reiss wrote:
>>> You need to get both the syntax right as well as the names of the
>>>
>>> units (which are strings).  E.g.,
>>>
>>>
>>>
>>> UnitConvert[Quantity[55 , "Miles"/"Hours"],
>>>
>>> Quantity["Meters"/"Seconds"]]
>>>
>>>
>>>
>>> Go back and spend a bit of time reviewing the documentation and
>>>
>>> working through the examples for the functions that are contained in
>>>
>>> the documentation....  ;-)
>>>
>>>
>>>
>>> --David
>>>
>>>
>>>
>>>
>>>
>>> On Dec 18, 2:35 am, tio54...@gmail.com wrote:
>>>
>>>> I continue to receive "Unable to interpret unit specification m/s" (for example, but almost anything I attempt returns this message) with input:
>>>
>>>> UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combination of quotes, omitted quotes, etc. Even the prediction/suggestion box,
>>> when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens when I select "Convert" in the prediction box yields the same "unable to interpret unit specification.
>>>
>>>>
>>>
>>>> What the heck????
>>
>
> ---
> Murray Eisenberg                                    murray@math.umass.edu
> Mathematics & Statistics Dept.     
> Lederle Graduate Research Tower            phone 413 549-1020 (H)
> University of Massachusetts                               413 545-2838 (W)
> 710 North Pleasant Street                         fax   413 545-1801
> Amherst, MA 01003-9305
>
>
>
>
>

---
Murray Eisenberg                                    murray@math.umass.edu
Mathematics & Statistics Dept.      
Lederle Graduate Research Tower            phone 413 549-1020 (H)
University of Massachusetts                               413 545-2838 (W)
710 North Pleasant Street                         fax   413 545-1801
Amherst, MA 01003-9305





[toc] | [prev] | [next] | [standalone]


#12921

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-12-22 10:01 +0000
Message-ID<kb40df$kf$1@smc.vnet.net>
In reply to#12856
The outut from your third example showed you that Mathematica was
expecting you to use "AngularDegrees" as the output units

(d = UnitConvert[Quantity[0.81, "Radians"], "AngularDegrees"]) // InputForm

Quantity[46.40958140559669,
 "AngularDegrees"]

or use WA to discover the appropriate units to use

WolframAlpha["convert 0.81 radians to degrees",
   "ComputableData"][[1]] // InputForm

Quantity[46.4, "AngularDegrees"]


Bob Hanlon


On Fri, Dec 21, 2012 at 5:39 AM, jsheinwald <jsheinwald@comcast.net> wrote:
> One problem with the UnitConvert command in Mathematica 9 is that it is not consistent.
>
>
>
> In[7]:= a = UnitConvert[Quantity[55, "Miles"/"Hours"], Quantity["Meters"/"Seconds"]]
>
> Out[7]= Quantity[96800/3937, ("Meters")/("Seconds")]
>
> Works.  But so does:
>
>
> In[8]:= b = UnitConvert[Quantity[78, "Centimeters"/"Seconds"], "Inches"/"Minutes"]
>
> Out[8]= Quantity[234000/127, ("Inches")/("Minutes")]
>
> This, as expected works:
>
>
> In[9]:= c = UnitConvert[Quantity[0.6, "Radians"], Quantity["Degrees"]]
>
> Out[9]= Quantity[34.3775, "AngularDegrees"]
>
> But this does not:
>
>
> In[10]:= d = UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>
> During evaluation of In[10]:= UnitConvert::unkunit: Unable to interpret unit specification Degrees. >>
>
> Out[10]= UnitConvert[Quantity[0.81, "Radians"], "Degrees"]
>
> There are some serious consistency problems with the way unit conversions are implemented in Mathematica 9.  The examples in the help files could use some improvement too.
>
>
>
>
>
>
> On Wednesday, December 19, 2012 4:55:49 AM UTC-5, David Reiss wrote:
>> You need to get both the syntax right as well as the names of the
>>
>> units (which are strings).  E.g.,
>>
>>
>>
>> UnitConvert[Quantity[55 , "Miles"/"Hours"],
>>
>> Quantity["Meters"/"Seconds"]]
>>
>>
>>
>> Go back and spend a bit of time reviewing the documentation and
>>
>> working through the examples for the functions that are contained in
>>
>> the documentation....  ;-)
>>
>>
>>
>> --David
>>
>>
>>
>>
>>
>> On Dec 18, 2:35 am, tio54...@gmail.com wrote:
>>
>> > I continue to receive "Unable to interpret unit specification m/s" (for example, but almost anything I attempt returns this message) with input:
>>
>> > UnitConvert[55 mi/h,"m/s"] or UnitConvert[55 mi/h,m/s] or any other combination of quotes, omitted quotes, etc. Even the prediction/suggestion box,
>> when I execute Quantity[55,"mi/hour"}, after it returns 55 mi/h, if I type in any combination of m/s, "m"/"s", "m/s", etc. into the box that opens when I select "Convert" in the prediction box yields the same "unable to inter=
>>
>> pret unit specification.
>>
>> >
>>
>> > What the heck????
>
>

[toc] | [prev] | [next] | [standalone]


#12927

Fromdr DanW <dmaxwarren@gmail.com>
Date2012-12-23 12:08 +0000
Message-ID<kb6s81$23e$1@smc.vnet.net>
In reply to#12856
Do you have a live Internet connection when evaluating your Quantity expressions? The new units system relies heavily on WolframAlpha for interpretation of units, and many Quantity or other unit-related functions will fail if Mathematica is unable to contact WolframAlpha for help.  This seems to happen mostly when entering Quantities; if the strings representing your units are not immediately recognized by Mathematica, the strings get shipped to W|A.  I've gotten in the habit of starting an inline W|A box, typing my desired quantity, then using Evaluate In Place on the box.  This gives me the quantity in a form that, I believe, will not require W|A next time I evaluate the notebook.  Using InputForm will also let you see the proper naming and spelling of the units for next time.

Daniel

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web