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: Terrible unit trouble in Mathematic 9
Replies: 11   Last Post: Dec 23, 2012 1:15 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 906
Registered: 10/29/11
Re: Terrible unit trouble in Mathematic 9
Posted: Dec 22, 2012 5:01 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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????
>
>





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.