If I want to calculate with units, for example using Pythagoras theorem, I would do this:
c = Sqrt[(3m)^2 + (5m)^2]
The result will be 5 Sqrt[m^2].
How can I define that m = Sqrt[m^2] and so forth?
|
If I want to calculate with units, for example using Pythagoras theorem, I would do this:
The result will be How can I define that |
|||
|
|
|
Take a look at this blog post by Jon McLoone: Automatic Physical Units in Mathematica where he explains how to use this package: which has over 1000 physical units. Also you can simply use Wolfram|Alpha integration in Mathematica. At the beginning of any input line type single equal sign and see it turn into a large orange equal sign, - then compute:
Using little plus sign at the top right corner you can do more complicated things, like mixed units computation for mechanical kinetic energy below, giving correct units of Joules:
Typing equal sign twice you can get a full Wolfram|Alpha query in your notebook with more relevant info:
|
||||
|
|
Or, if you want to have this assumption during your whole session you could define:
Now
|
|||
|
|