Questions about calculating with units in Mathematica.

learn more… | top users | synonyms (2)

31
votes
4answers
2k views

Are Mathematica 9 units really slow?

This generates 75 unitized pairs for a plot that displays physical units: ...
27
votes
7answers
2k 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: ...
26
votes
2answers
555 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 ...
23
votes
2answers
837 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 Internet access. Is there a complete ...
15
votes
2answers
569 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
14
votes
1answer
415 views

Unexpected behavior of UnitConvert

When I evaluate this expression: ...
11
votes
1answer
1k 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, ...
11
votes
1answer
460 views

Kelvin per Kelvin Difference

I'm trying to use Mathematica units more often, but I've run into the following problem: ...
11
votes
1answer
404 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 ...
11
votes
1answer
224 views

Possible bug: Quantity[2,“meters”] returns 2 None meters

I'm using 10.0 for Linux. Trial 1: Quantity[2,"meters"] 2 None meters Trial 2: Quantity[2,"Meters"] 2 meters Trial 3: ...
10
votes
5answers
887 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 ...
9
votes
1answer
245 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 ...
9
votes
0answers
112 views

Why is this evaluation halved when adding units?

Why does this strange behavior occur when dealing with units and quantities? ...
8
votes
2answers
1k 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 ...
8
votes
1answer
308 views

Cannot plot Quantity values with DateListPlot

Is there a way to use DateListPlot with Quantity values? I retrieved the following time series data from WolframAlpha: ...
7
votes
2answers
194 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 ...
7
votes
4answers
561 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 ...
6
votes
3answers
258 views
6
votes
3answers
137 views

Why does adding 6.1 seconds display as having added 6.099?

Why does adding 6.1000000 seconds to a DateObject display as having added 6.099? If I copy the Out[20] element from this picture, it contains the correct value: ...
6
votes
3answers
215 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
1answer
144 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? ...
6
votes
0answers
351 views

Incomplete implementation of units?

I've been playing around with the new units capability in MMA9 and I'm becoming a bit frustrated with what I perceive as an incomplete implementation of this capability and I'm wondering if there are ...
5
votes
1answer
316 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?
5
votes
1answer
47 views

How do I perform exact unit conversions with irrational conversion factors?

Suppose I want to express $3h$ in units of $\hbar$ (where $h$ and $\hbar$ are the Planck constant and reduced Planck constant, respectively). By definition, $h = 2\pi\hbar$, but when I attempt this ...
5
votes
0answers
195 views

Units: Custom-defined units possible?

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\; ...
5
votes
0answers
170 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 ...
4
votes
2answers
147 views

Is there a build-in function converting a quantity to one with mixed units (such as feet and inches)?

For example, I want to convert 179 centimeters into 5 feet and 10.4724 inches instead of 70.4724 inches (as this website did). Maybe in the future I would need to convert days to {years, months, days} ...
4
votes
1answer
73 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. ...
4
votes
2answers
400 views

Using units and piecewise functions in Integrate

For simple cases, Quantities appear to be handled well by Integrate: ...
4
votes
2answers
406 views

Why doesn't Mathematica divide out the Kelvins?

I thought I understood Mathematica V9 units. However, I can't get these numbers to plot, or even to come out to a nice clean unit of mass (say grams). The Kelvin's ...
4
votes
1answer
148 views

NumberForm and units

NumberForm can be used to print Quantities to a specified precision. For example, x=Quantity[5.123456789,"Meters"]; 5.12346 m Print[NumberForm[x,{4,2}]] 5.12 m ...
4
votes
1answer
81 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 ...
4
votes
0answers
125 views

LowpassFilter in v10: unit issues?

Bug introduced in 10.0.0 and persisting through 10.0.2 or later I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for ...
3
votes
3answers
258 views

How to deal with units in logarithms?

I'm trying to take a formula, take it's integral which yields a formula with logarithms, and then directly plug in values with units and get an answer. However if the units go into any of the ...
3
votes
2answers
127 views

Draw and Quantity

I'd like to use Quantity in my graphics, but I can't figure out how to do it even for a very simple Circle. ...
3
votes
2answers
115 views

Something wrong with the way units are handled in V10

(This applies only to version 10) I obtain these two properties of silicon: a = ElementData[14, "CrustAbundance"] b = ElementData[14, "MeteoriteAbundance"] both ...
3
votes
1answer
138 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?
3
votes
1answer
555 views

How to get the quantity of Physical constants?

I need to get the quantity of gravitational constant: QuantityMagnitude[GravitationalConstant] why this is not work? Already load the ...
3
votes
1answer
651 views

Unit issues in Mathematica 9

I posted the following on the Google+ group comp.soft-sys.math.mathematica and had no luck with responses. I've done a Google search and, to the best of my ability, ...
3
votes
3answers
219 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 ...
3
votes
2answers
937 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: ...
3
votes
1answer
102 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: ...
3
votes
1answer
77 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"?
3
votes
1answer
240 views

Why cant Mathematica 9 interpret this unit?

I'm using Mathematica 9.0.1. Sorry for using an image, but pasting code messed up the output formatting. I'd like to represent 25 Btu/(hr ft F). All units are spelled correctly as identified in ...
3
votes
1answer
511 views

Simplifying to different units

Is there a way to force Mathematica to UnitSimplify to a different unit? For example, I would like kg m^2/s^2 to simplify to ...
3
votes
1answer
276 views

Wavelength, wavenumber, energy and frequency in a ruler

I would like to generate set of four axis relating wavelength, wavenumber, energy and frequency in an arbitrary range. Like in this image but without the labels such as "RADAR". The selection of ...
3
votes
1answer
114 views

Choosing the units for plotting

I´m new to using units in Mathematica. I have read other similar posts about this issue but I haven´t found an answer so far. My problem is simple: I want to plot a certain function with a certain ...
3
votes
1answer
425 views

Problem in units convertion when multipliying Boltzmann constant and a temperature

When define the temperature of a variable in Celsius, Mathematica 9.0 does not calculate the right answer when multiplying by boltzmann constant. Example: ...
3
votes
0answers
44 views

Powers of dimensionless quantities: is this a bug?

Today I came across the following behavior: Quantity[x, "Minutes"/"Minutes"]^-1 (* Quantity[1/x, (1/#1 &)[("Minutes")/("Minutes")]] *) It seems that ...
2
votes
2answers
153 views

Calculations with physical units [closed]

I really don’t get the Units in Mathematica 9. to work. I have tried this in the past for several times and at the end always run into some troubles. For example ...