Skip to main content

Questions tagged [units]

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

Filter by
Sorted by
Tagged with
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
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.2k
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
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 ...
bobthechemist's user avatar
31 votes
2 answers
4k views

Unit Discovery: Is this some sort of a sick joke?

Alright, let's have some fun here. I am essentially following the documentation by Wolfram, just looking at different quantities. ...
Pirx's user avatar
  • 4,159
29 votes
2 answers
689 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.2k
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,626
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
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,931
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,419
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?
TetstName123's user avatar
16 votes
2 answers
8k views

Numerical value of physical constants Mathematica 10

Is there a way to use the physical constants in calculations and have Mathematica 10 figure out the final unit and numerical magnitude? When I try ...
Amrash's user avatar
  • 163
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
15 votes
1 answer
649 views

Unexpected behavior of UnitConvert

When I evaluate this expression: ...
Niki Estner's user avatar
  • 36.2k
15 votes
1 answer
681 views

Why is this evaluation halved when adding units?

Bug introduced in 9.0 or earlier and persisting through 11.2 or later Why does this strange behavior occur when dealing with units and quantities? ...
wchargin's user avatar
  • 413
14 votes
3 answers
692 views

Dimensionless units like Percent are not treated consistently by functions like Exp or Log. How can pitfalls be avoided?

There are so many false calculations out there that working with Quantity und units—at least initially—should be mandatory in many applications. Alas, ...
gwr's user avatar
  • 13.6k
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
14 votes
1 answer
388 views

How to have the units for energy show as kW h instead of h kW?

I observe the following in Wolfram Language: Quantity[ 1, "Kilowatt hours" ] (* or "Kilowatts" * "Hours" *) (* 1 h kW *) That looks ...
gwr's user avatar
  • 13.6k
13 votes
1 answer
352 views

Possible bug: Quantity[2,"meters"] returns 2 None meters

Bug introduced in version 10 or earlier and fixed in version 10.0.2 I'm using 10.0 for Linux. Trial 1: Quantity[2,"meters"] 2 None meters Trial 2: ...
Jacob Schwartz's user avatar
13 votes
1 answer
390 views

Is Quantity necessary?

Soft question: are Quantity - and newly added MixedUnit and MixedMagnitude - needed in a ...
alancalvitti's user avatar
  • 15.2k
12 votes
1 answer
554 views

How do I seamlessly migrate from the older Units package to Mathematica 9's Quantity objects?

I have several notebooks that make use of the Units package and would like to be able to work simultaneously with the older units and ...
Daniel W's user avatar
  • 3,426
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 ...
Alexey Popkov's user avatar
12 votes
1 answer
138 views

Display bug in Dataset's UnitConvert handling

Bug introduced in 11.0.1 or earlier and fixed in 11.1.0 Is this yet another annoying regression in v11 Dataset type handling? The display form seems to be a ...
alancalvitti's user avatar
  • 15.2k
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.3k
11 votes
1 answer
257 views

How can I get curated data to be expressed consistently in SI units?

AstronomicalData objects are consistently in SI units: ...
atapaka's user avatar
  • 4,006
11 votes
4 answers
375 views

How to prevent Quantity calculations from converting units

I have an accrual calculation that I would like to preserve the units even though they are of the same dimension (e.g. time). For example, I would like the following ...
Edmund's user avatar
  • 43.1k
10 votes
1 answer
321 views

Where is the unit after a calculation?

I was playing with some of the new features, and when I type e.g. Quantity[10, "ml"] + Quantity[250 - 100, "ml"] I get ...
Mockup Dungeon's user avatar
10 votes
2 answers
1k views

Why do I get QuantityUnits`Private`ToQuantity when trying to use units?

I'm unable to use units in mathematica (10.3.1) When I do Quantity[500, "Feet"] + Quantity[50, "Meters"] the answer I get is ...
team-rf's user avatar
  • 435
10 votes
1 answer
722 views

Mathematica seems confused about Kilograms vs KilogramsForce

This does what I expect: Quantity["Kilograms"*"Meters"] // InputForm Quantity[1, "Kilograms"*"Meters"] This, on the other hand, bungles the units: ...
Roman's user avatar
  • 49.3k
10 votes
2 answers
269 views

Why does using different units but same physical value give different result?

I'm trying to define a variable with the value of the thermal constant $V_T$. The value of the thermal constant is given in Volts as $V_T = \frac{k T}{q}$, where $k$ is the Boltzmann constant and $q$ ...
sgdsgyhetwaraw's user avatar
9 votes
3 answers
678 views

Convert units to String

Is there a way to convert compound units to string? For example, I have "Newtons"/"Meters"^2, how to I convert it to "N/m^2"? I know If I do the following ...
Yituo's user avatar
  • 1,419
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, ...
Steven Thomas Hatton's user avatar
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
  • 4,006
9 votes
1 answer
163 views

Why does the front-end no longer like MixedRadix as an argument for UnitConvert?

I often find MixedRadix very useful for make certain kinds of unit conversions. For example, ...
m_goldberg's user avatar
  • 108k
9 votes
2 answers
140 views

Can Quantity interpretation be accepted using the keyboard?

Entering Ctrl+= on selected text results in the display of an interpreted Quantity, with the option to accept it, or choose other interpretations. The only way I ...
Steven Thomas Hatton's user avatar
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
5 answers
566 views

Mathematica function which formats Physics calculation

One small step toward automating homework :) My lecturer doesn't accept calculations done in Mathematica code as homework. I have 30 pages of small calculations such as the one below. I don't want to ...
Conor Cosnett's user avatar
8 votes
3 answers
499 views

How to "factor out" units?

I have a huge expression that makes use of Mathematica's units support (Quantity[]) that I know evaluates to a dimensionless quantity. However, I'm unable to get <...
小太郎's user avatar
  • 223
8 votes
3 answers
6k views

Why are Dalton and Grams / Moles not equivalent units?

The following code throws an error: UnitConvert[Quantity["Daltons"], "Grams"/"Moles"] Why?
a06e's user avatar
  • 11.5k
8 votes
1 answer
794 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
8 votes
1 answer
8k views

Convert radian to degree and add °

How can I convert a radian angle to a degree one and add ° after it? I am using N[(Pi/4)/Degree], but the output is 45. with ...
Ale1794's user avatar
  • 545
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 ...
KF Gauss's user avatar
  • 183
8 votes
1 answer
518 views

Working with degrees minutes and seconds without conversion

Is there a way to work with angles in DMS without converting them to decimal degrees, that is to sum them, subtract them? I do not know how to even enter it without using string. My idea is something ...
atapaka's user avatar
  • 4,006
8 votes
4 answers
1k views

Suppress connection to Wolfram|Alpha when making unit conversions

I want to speed up calculations with unit conversions. I suspect primarily that some units evaluate from Wolfram|Alpha. Any way to prevent this automatically, so that Mathematica throws errors/...
den.run.ai's user avatar
8 votes
1 answer
469 views

Moles/Liters doesn't get simplified to Molar even though Molar*Liters gets simplified to Moles

Why can't Mathematica 9 simplify mol/L to M, when it can simplify M*L to mol? ...
Tyilo's user avatar
  • 1,555
8 votes
1 answer
418 views

Cannot plot Quantity values with DateListPlot

Bug introduced in 9.0.0 and fixed in 9.0.1 Quantity is new in 9.0.0 Is there a way to use DateListPlot with ...
jerome's user avatar
  • 547
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 ...
Cassini's user avatar
  • 5,626
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 ...
c186282's user avatar
  • 1,402
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}}{\...
Chrissy's user avatar
  • 81
7 votes
3 answers
500 views

Why does this Quantity calculation lose precision?

...
Escalona's user avatar

1
2 3 4 5
7