MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Terrible unit trouble in Mathematic 9

  • To: mathgroup at smc.vnet.net
  • Subject: [mg129221] Re: Terrible unit trouble in Mathematic 9
  • From: Murray Eisenberg <murray at math.umass.edu>
  • Date: Sat, 22 Dec 2012 05:01:42 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kap6c4$469$1@smc.vnet.net> <kas2v5$ci1$1@smc.vnet.net> <20121221103924.B445A68CF@smc.vnet.net>

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 at 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... at 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 at 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








  • Prev by Date: Re: Terrible unit trouble in Mathematic 9
  • Next by Date: Re: SystemModeler Users?
  • Previous by thread: Re: Terrible unit trouble in Mathematic 9
  • Next by thread: Re: Terrible unit trouble in Mathematic 9