Questions tagged [units]

Questions about using, converting, or interpreting units of measurement in Mathematica.

Filter by
Sorted by
Tagged with
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: ...
Niki Estner's user avatar
  • 36.1k
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 ...
SWB's user avatar
  • 625
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 ...
István Zachar's user avatar
33 votes
3 answers
809 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 ...
bobthechemist's user avatar
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 ...
swish's user avatar
  • 7,891
7 votes
3 answers
487 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-...
Max Coplan's user avatar
5 votes
1 answer
362 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 ...
rhermans's user avatar
  • 36.5k
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: ...
GIulio's user avatar
  • 31
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 <...
Sam Bader's user avatar
  • 411
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
Yituo's user avatar
  • 1,399
9 votes
1 answer
439 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, ...
Steven Thomas Hatton's user avatar
8 votes
1 answer
784 views

Using physical dimensions in Mathematica DSolve

I would like to calculate a system of two differential equations in Mathematica using DSolve, like: ...
LLapsus's user avatar
  • 83
29 votes
2 answers
686 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 ...
Niki Estner's user avatar
  • 36.1k
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, ...
Cassini's user avatar
  • 5,566
17 votes
4 answers
7k 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?
TetstName123's user avatar
12 votes
2 answers
592 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 ...
Alexey Popkov's user avatar
8 votes
2 answers
530 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 ...
KF Gauss's user avatar
  • 183
6 votes
1 answer
644 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 ...
Giacomo Ciani's user avatar
5 votes
1 answer
504 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?
swish's user avatar
  • 7,891
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: ...
geraldcecil's user avatar
15 votes
1 answer
648 views

Unexpected behavior of UnitConvert

When I evaluate this expression: ...
Niki Estner's user avatar
  • 36.1k
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 ...
grbl's user avatar
  • 1,042
13 votes
1 answer
385 views

Is Quantity necessary?

Soft question: are Quantity - and newly added MixedUnit and MixedMagnitude - needed in a ...
alancalvitti's user avatar
  • 15.1k
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 ...
matheorem's user avatar
  • 17.1k
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 ...
atapaka's user avatar
  • 3,954
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 =...
Chen Stats Yu's user avatar
8 votes
0 answers
332 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 ...
c186282's user avatar
  • 1,402
8 votes
1 answer
327 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 ...
Cassini's user avatar
  • 5,566
8 votes
0 answers
728 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}}{\...
Chrissy's user avatar
  • 81
7 votes
3 answers
492 views

Why does this Quantity calculation lose precision?

...
Escalona's user avatar
6 votes
1 answer
251 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. ...
Alexey Bobrick's user avatar
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 ...
Sam Bader's user avatar
  • 411
6 votes
3 answers
466 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. ...
Anatol's user avatar
  • 61
5 votes
1 answer
154 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 ...
b3m2a1's user avatar
  • 46.9k
5 votes
2 answers
274 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): ...
Asas's user avatar
  • 198
5 votes
1 answer
339 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: ...
Martin J.H.'s user avatar
4 votes
0 answers
121 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] ...
unlikely's user avatar
  • 7,103
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"?
Yituo's user avatar
  • 1,399
4 votes
2 answers
2k 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 ...
Edmund's user avatar
  • 42.3k
4 votes
1 answer
277 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 ...
Tyler Durden's user avatar
  • 4,090
3 votes
3 answers
323 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/...
Cassini's user avatar
  • 5,566
3 votes
4 answers
395 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 ...
Steve's user avatar
  • 1,153
3 votes
2 answers
453 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 ...
Francis Bush's user avatar
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). ...
jamesson's user avatar
  • 465
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$-...
Piquan's user avatar
  • 476
2 votes
0 answers
152 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 ...
JustAGuy's user avatar
2 votes
0 answers
110 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 ...
user2757771's user avatar
2 votes
2 answers
324 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, ...
matheorem's user avatar
  • 17.1k
2 votes
1 answer
248 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 ...
user3014065's user avatar
1 vote
0 answers
76 views

How to prohibit automatic DegreesCelsius converting to Kelvins?

On this wiki page, temperature conversion is presented clearly. For example. It also warns that we should take care of temperature difference conversion which is a different conversion as It is ...
matheorem's user avatar
  • 17.1k