Questions tagged [units]
Questions about using, converting, or interpreting units of measurement in Mathematica.
55
questions
39
votes
8
answers
4k
views
Simpler input for the new unit support
I've been playing with the new unit support in Mathematica 9. It seems very useful, but the syntax is very verbose. Instead of typing:
...
36
votes
3
answers
2k
views
Built-in unit strings recognized by Quantity?
It’s great that Quantity can utilize Wolfram Alpha to interpret unit strings that it doesn’t recognize, but I need my code to work on machines that do not have ...
16
votes
3
answers
1k
views
How to convert between various ItemSize/ImageSize units?
How can one convert between the implicit units used by Grid (ems and line height for horizontal and vertical dimensions) and printers points (in ...
33
votes
3
answers
810
views
Speed of curated data calls in Version 10
Curated datasets underwent a significant overhaul in version 10, primarily in the way content is delivered in the form of Objects and Entities. Additionally, it appears that this change in content ...
18
votes
5
answers
2k
views
Implementing CGS unit system in Mathematica 9
So I've just installed the trial version of Mathematica 9. The first noticeable feature for me is the new built-in physical units. I used AutomaticUnits package ...
7
votes
3
answers
500
views
Specify set of base units to use in UnitConvert
I am trying to convert arbitrary units to CGS. I know this can get a bit tricky with ESU, but for this question that does not need to be addressed.
What I would like to do is to give a quantity-to-...
5
votes
1
answer
364
views
How to set UnitSystem permanently
I would like to set the system of units ($UnitSystem) permanently to "Metric".
I know that I can do
...
3
votes
2
answers
2k
views
Units, plotting and empty plots
maybe I'm completely newbie but I can't understand the behavior of units and the command plot.
I'm doing some easy plotting of the state equation for gasses:
...
20
votes
3
answers
2k
views
Kelvin per Kelvin Difference
Bug introduced in 9 and partially persists through 10.2 or later
The specific bug described in the original question is fixed ("Kelvin" is correctly recognized as <...
17
votes
2
answers
2k
views
Where to see all Mathematica units [duplicate]
Is there a tutorial page that have all Mathematica units? I sometimes have hard time figuring out the correct unit spelling when using quantities
9
votes
1
answer
442
views
Change units in PlanetData["Earth", "Diameter"] from miles to km
When I enter
AstronomicalData["Earth", "Radius"]
I get Quantity[6.3674447*10^6, "Meters"]
I would have preferred kilometers, ...
8
votes
1
answer
795
views
Using physical dimensions in Mathematica DSolve
I would like to calculate a system of two differential equations in Mathematica using DSolve, like:
...
29
votes
2
answers
690
views
Should 0 * 5ft be 0 or 0ft?
After playing with the new quantity system in Mathematica 9 for a while, I keep stumbling over this issue:
0 * Quantity[1, "Meters"]
is not the same as
...
20
votes
1
answer
4k
views
Is there a "No Units" (i.e., dimensionless) unit?
I would like to be able to call the Quantity function with a null unit so that it returns the original dimensionless value. For example,
...
17
votes
4
answers
8k
views
How to dequantify units in mathematica?
Is there a function which applied to a quantity returns its numerical value so I for instance can fill it into my Predictorfunction?
8
votes
2
answers
543
views
Getting useful units for combinations of physical constants like on WolframAlpha?
When I need to do order of magnitude estimates, I often encounter situations where I have a mess of physical constants and difficulty putting them in sensible units.
For example, consider the ...
6
votes
1
answer
654
views
Dimensionless quantities
I must admit that I don't think this problem is really new. However, I haven't found a post dealing exactly with this aspect of the issue.
I am doing calculation using Quantities, but I have problems ...
5
votes
1
answer
505
views
Getting all physical units with prefixes
How we can get the list with all physical units and prefixes from WolframAlpha and make symbols from the result to be equal their corresponding quantities like described in this post?
40
votes
4
answers
3k
views
Are Mathematica 9 and 10 units really slow?
This generates 75 unitized pairs for a plot that displays physical units:
...
15
votes
1
answer
649
views
Unexpected behavior of UnitConvert
When I evaluate this expression:
...
14
votes
4
answers
1k
views
Automatically add appropriate prefix to Quantity
Is there a function that automatically adds the appropriate prefix to a Quantity object?
For example, I would like a function
...
13
votes
1
answer
390
views
Is Quantity necessary?
Soft question: are Quantity - and newly added MixedUnit and MixedMagnitude - needed in a ...
12
votes
0
answers
108
views
Differences of Quantities gives different result in different Mathematica version
In Mathematica 12.2
Differences[{Quantity[1, "mm"], Quantity[1, "mm"]}]
gives
...
12
votes
2
answers
599
views
Is it reasonable to have both TemperatureUnit and TemperatureDifferenceUnit?
When adding the bugs header to the question "Kelvin per Kelvin Difference" I was confused by the fact that I cannot determine for sure whether the described bug is fixed in version 10.2 or not: from ...
9
votes
2
answers
1k
views
Physical (and other) constants
As Mathematica documentation likes to say, "As of Version 9.0, physical constant functionality is built into the Wolfram Language". After clicking on the ">>", one ...
8
votes
0
answers
345
views
Spectral Radiance unit Flicks is not correct
Bug introduced in version 10.3 or earlier and fixed in 11.1.
I was pleasantly surprised that Mathematica (10.3, 10.4, 10.4.1, 11.0 and 11.0.1) had the unit $\text{flick}$ until I spent several hours ...
8
votes
2
answers
2k
views
Conversion between GB and MB (and KB)
UnitConvert[Quantity[1, "GB"], "MB"]
Quantity[1000, "Megabytes"]
Which is NOT something we would normally expect.
Is this a bug?
How can I use 1024MB =...
8
votes
1
answer
331
views
Quantity and Trig functions
I have a bunch of data to which I've assigned units using Quantity, including some angular measurements in degrees. I'd like to be able to use these measurements ...
8
votes
0
answers
742
views
Units: Custom-defined units possible? [closed]
Converting between revolutions per minute (RPM) and revolutions per second (RPS) is not straightforward for me in Mathematica.
I know that $1\; \text{RPM} = \frac{2\; \times\; \Pi\; \text{Radian}}{\...
7
votes
3
answers
501
views
6
votes
1
answer
4k
views
Plotting with Units
I'm trying to get Mathematica to plot with units, but I'm having some trouble.
Below is a minimal example of trying to plot y = x, where ...
6
votes
3
answers
471
views
Can't force UnitConvert to be evaluated in Plot
I'm trying to use new units support in Mathematica 9.
When I Plot Quantity functions everything is OK.
...
6
votes
1
answer
253
views
How to create fast functions based on units?
Using units is a good means for rapidly developing code, since it provides some error control.
Hovewer, using Mathamatica functions containing units appears to be copmutationally inefficient.
...
5
votes
1
answer
160
views
Custom conversion rules in UnitConvert
I want to make UnitConvert operate on custom units with special rules.
For instance, I would like to be able to convert between ...
5
votes
2
answers
276
views
Can I convert a list of units to a different base set?
I have a list of quantities with varying units (a short example list is shown below):
...
5
votes
1
answer
340
views
UnitConvert works despite wrong dimension - bug or feature?
I am surprised that there are some cases where unit conversion works, even if the input- and output dimensions are clearly different:
...
4
votes
1
answer
284
views
Working with tables of equations in different units
I frequently work with tables of engineering equations in different units. I suppose physicists might do the same thing. For example, a table might look like this:
Some of the values are inputs and ...
4
votes
1
answer
189
views
Is there a way to display units in short label?
For example, forQuantityUnit[Quantity[1, "Meters"]], is there a way to display the results as"m" instead of "Meters"?
4
votes
2
answers
3k
views
How to specify units for ImageSize Option? [duplicate]
I'm trying out making a CDF and I want it to print within the margins of Letter paper. There is an ImageSize option that I would like to set; some plots will be in ...
4
votes
0
answers
123
views
Inequality involving Quantity stays unevaluated
Bug introduced in 10.1 and solved in 11.1
An expression like this one
a < x < b
is represented as
Less[a, x, b]
...
3
votes
2
answers
474
views
Why are Quantity and Units inconsistent with regular Mathematica behavior?
When I enter this in Wolfram Mathematica V12:
0 Dogs + 5 Cats
Mathematica sensibly returns this:
5 Cats
BUT, if I using the ...
3
votes
4
answers
396
views
Cancelling units in two-argument ArcTan
Consider
ArcTan[3, -3]
(* out: *) -Pi/4
ArcTan[3 a Sin[t/2], -3 a Sin[t/2]]
(* out: *) ArcTan[3 a Sin[t/2], -3 a Sin[t/2]]
However, we can fix the ...
3
votes
3
answers
327
views
Inputting abbreviated units [duplicate]
Possible Duplicate:
Simpler input for the new unit support
Is there a way to input abbreviated units directly from the keyboard? One can get a value with abbreviated units through the Wolfram/...
3
votes
3
answers
2k
views
How do I properly use Quantities (units) in plots?
I'm having some problems making plots with quantities in Mathematica Online 11.3.0.
If I make a plot that is defined with the $x$-axis as an independent quantity (e.g., 0 to 3 seconds) and the $y$-...
3
votes
3
answers
7k
views
Can I format units using engineering prefixes?
I'm in the early stages of learning about units. It seems easy enough to express numerics and symbolics in units, but what I would really like to do is append engineering prefixes (km, mA, MW, etc). ...
2
votes
1
answer
253
views
How do I extract units from an expression
I need to take the units off of this expression:
(5 Coulomb)/(6 Second)
In order to do some unit simplification. Is there any way to do this? I have tried Case, but could not get it to work ...
2
votes
0
answers
164
views
How to handle Units when Integrating?
I have some functions defined, which are to use units. Now another function is used to integrate over those, with the integration variable also quantified and the input to said function. I better just ...
2
votes
0
answers
111
views
Mathematica not simplifying expressions with units
Hi I'm having an issue with the Quantity system.
On the guide for units on the wolfram page, there is an example
...
2
votes
2
answers
327
views
Why does System`Private`ConstructNoEntry[Quantity, 1, "kg"] enter a Recursion?
System`Private`ConstructNoEntry[BesselJ, 0, x]
works fine, and outputs
BesselJ[0, x]
However,
...
2
votes
1
answer
405
views
NDSolve and Quantity[]
I'm working on a set of relatively basic ODEs of a physical pendulum and motor:
$$\left\{\text{jb} \theta ''(t\text{s})+\text{rb} \theta '(t\text{s})+\alpha \sin (\theta (t\text{s}))+\mu \tan ^{-1}\...