Questions about calculating with units in Mathematica.

learn more… | top users | synonyms (2)

0
votes
0answers
38 views

UnitConvert is fun, but how to remove the Units from a UnitConverted expression? [closed]

This is certainly something that Mathematica didn't intend but... For example: ...
1
vote
0answers
20 views

Using Infinity with AutomaticUnits

I am using the AutomaticUnits package in Mathematica 10, and I am writing some unit checking functions. However, I run into a problem when I have an Infinity, since ...
2
votes
1answer
82 views

Physical quantities to decimal power

How can I get Mathematica to properly simplify physical quantities with dimensions to decimal power, such as $1 \frac{1}{\text{s}^{0.7}}\text{dynes}\text{/(}\text{cm}^2\text{Pa})$ that should simplify ...
2
votes
1answer
65 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
3answers
163 views

How to extract numeric value?

Considering two situations: I have a string "F2.5" and Quantity["2.3s"]. How can the numeric value be extracted to have: ...
2
votes
0answers
28 views

TimeSeriesInsert issue with Quantity expressions

This first sample code works as expected: ...
0
votes
0answers
15 views

QuantityArray display and UnitConvert

In the reference: But if you try (Mathematica 10.1 Windows 8.1 x84): qa = QuantityArray[{2.3, 1.5, 9.0}, "Meters"]
1
vote
0answers
41 views

Using Quantity[] units causes errors in my calculation

I have an interpolation function in which I wish to use actual units. If I perform the calculation normally, it works fine and returns a proper FittedModel. To illustrate my problem, consider the ...
4
votes
1answer
90 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. ...
0
votes
0answers
63 views

Mathematica 10.1 doesn't recognize “Events” unit

Today's Wolfram blog post inspired me to play with the TemporalData and MovingMap features, and in the process of doing so, I ...
1
vote
0answers
43 views

Inequality involving Quantity stays unevaluated

Mathematica 10.1.0, Windows 8.1 x64 An expression like this one a < x < b is represented as Less[a, x, b] while ...
4
votes
1answer
189 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: ...
2
votes
1answer
34 views

MixedRadix rounds incorrectly

You can Round Quantitys. For example, how many inches are in a meter? ...
3
votes
0answers
51 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 ...
5
votes
1answer
53 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 ...
1
vote
1answer
88 views

Changed appearance of Quantity expressions in v10.1.0

After installing Mathematica v10.1.0 (in Windows 8.1 x64), I noticed a change in appearance of Quantity expressions. For example under Mathematica v10.1.0: while ...
1
vote
1answer
56 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): ...
1
vote
1answer
88 views

AutomaticUnits in WM10

Despite the unit improvement in WM10, I am still a big fan of the AutomaticUnits package, as I find it faster and more elegant to work with. However, it seems to be ...
3
votes
2answers
140 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. ...
2
votes
1answer
56 views

QuantityVariable usage

When I try to run the following code, Mathematica gives me an error message: "Solve was unable to determine the units of quantities that appear in the input." ...
1
vote
1answer
50 views

Simplify CubeRoot of meter cubes

Why Mathematica doesn't simplify CubeRoot of meter cubes to meters? r = Quantity[10, "Meters"]; v = 4/3 r^3 Pi; CubeRoot[% * 3/4 / Pi] returns ...
1
vote
1answer
50 views

UnitConvert of a Quantity whose value is a function of a Quantity

I am having trouble with UnitConvert when the QuantityMagnitude contains an embedded ...
0
votes
1answer
51 views

Working with symbolic values in Quantities [duplicate]

I have the following expression: x Quantity[y, ("Milliwatts"*"Seconds"^2)/"Joules"] If I try to convert this to the SI unit, I would expect to get ...
1
vote
1answer
39 views

UnitConvert bar <-> Pa

I wanted to use the following unit cMax = Quantity[6.8221*^-9, "L/s/bar"]; But when calculating with it, I recognised there is some strange behaviour. So I tried ...
4
votes
1answer
94 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 ...
1
vote
1answer
82 views

Unit System documentation

Is there any documentation on what consists of the unit system "SIBase","Imperial", "SI" and ...
11
votes
1answer
227 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: ...
4
votes
2answers
162 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} ...
9
votes
0answers
119 views

Why is this evaluation halved when adding units?

Why does this strange behavior occur when dealing with units and quantities? ...
1
vote
0answers
78 views

Geodesy without units?

Suppose I'm interested in the latitude of Los Angeles and I do the following: ...
0
votes
1answer
123 views

Unit conversion is not simplifying units

I'm running into what looks like an error. ...
0
votes
1answer
86 views

NIntegrate with units: unable to determine the units of quanitites that appear in the input

I want to integrate Planck's law of radiation in a certain wavelength intervall with units. I define some constants: ...
0
votes
0answers
64 views

Plotting Earth's position with units

I'm trying to plot the Earth position with the Sun in the origin. I have two lists like this: ...
2
votes
1answer
102 views

How do you get a country's GDP per capita in Euros?

Right now, I'm getting the data in U.S. Dollars and converting it to Euros like this: ...
4
votes
1answer
151 views

LowpassFilter in v10: unit issues?

Bug introduced in 10.0.0 and fixed in 10.1.0 I tried this with a clean start and no documents loaded. Now, evaluating the following on the documentation page for ...
0
votes
0answers
34 views

Why numerical functions can't digest InterpolatingFunction with units?

Answering this question gave me the idea that I must be missing something.. In brief, numerical functions generally 'understand' units: ...
2
votes
1answer
86 views

UnitConvert to Electronvolts converts to Electronvolts/Moles

The question probably is clear from the title. When I want to convert a kinetic energy, that contains the Molar Gas-Constant into Electronvolts I get eV/mol. ...
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: ...
3
votes
2answers
118 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 ...
2
votes
2answers
176 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 ...
2
votes
1answer
120 views

Using Manipulate[ ] with physical units

I'm a new user, and am trying to build a simple Boyle's law system in Mathematica. I want to include the units of the values, as I may need to perform some conversions later. If my quantities are a ...
7
votes
2answers
207 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 ...
3
votes
1answer
82 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"?
2
votes
2answers
235 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 ...
2
votes
1answer
121 views

Converting in various currencies

I was just playing around with Mathematica converting some currencies: ...
15
votes
2answers
592 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
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 ...
1
vote
1answer
158 views

Solving equations with QuantityVariable

I'm trying to understand how to easily solve equations that use QuantityVariable. Why does this fail? ...
3
votes
1answer
151 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
295 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 ...