MathGroup Archive 2003

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

Search the Archive

Re: Use of units and simplification

  • To: mathgroup at smc.vnet.net
  • Subject: [mg38939] Re: Use of units and simplification
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Tue, 21 Jan 2003 07:38:22 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <b08mc9$80e$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

> Hallo,
> 
> I would like to use the units of Miscellaneous Units (Mathematica 4.2
> Windows).
> 
> 1) Why does Simplify[Sqrt[x*Meter^2]] give
> Sqrt[Meter^2*x] ? The result of the simplification is o.k. when I assume
> that Meter>=0:
> Simplify[Sqrt[x*Meter^2], Meter >= 0] ->Meter*Sqrt[x]
> 
> Of course I could always assume that any unit used is >=0, but that does
> not seem to be the right way.

A unit can't be >0 or what ever, it mean a real object and not a
number.

> Am I missing something? Is there a way to get the units "properly"
> simplified?

You say it already use Simplify[]/FullSimplify[] with a second argument,
i.e.,

Unprotect[Simplify]

Simplify[expr_]:=Simplify[expr,Miscellaneous`Units`Meter >=0]

Protect[Simplify]

> 
> 2) There is Meter and Centimeter predefined. Where have the Millimeters
> gone? I did not succeed in prepending any of the SI unit prefixes. Could
>   I simply use MilliMeter? Did not really work for me...

Convert[1 Milli Meter, Meter]

Meter/1000

and Notice the space between Milli and Meter


Regards
  Jens


  • Prev by Date: Moments of the multivariate normal distribution
  • Next by Date: Re: Integrating Abs[Sin[]^2]
  • Previous by thread: RE: Use of units and simplification
  • Next by thread: What is a smart way to do this?