Questions tagged [units]

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

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
1answer
235 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 ...
7
votes
0answers
448 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
0answers
74 views

Join on QuantityArray

I need to merge two QuantityArray objects of mixed type. My first attempt looks something like: ...
5
votes
0answers
67 views

Problem with specifying quantity value in FormulaData

I wanted to use the formulas for KineticEnergy and KineticEnergyRelativistic with specific quantity vaules. The later formula ...
5
votes
0answers
104 views

Calculations with “Quantities” Run Slow. What am I doing wrong?

This code plots a 1000 point black body radiation curve in 0.7 seconds. ...
5
votes
0answers
348 views

Is it possible to use Gaussian cgs units in Mathematica computations?

I was trying to do computations in Gaussian cgs units, and of course I failed due to dimensional issues. For instance, $q_1 q_2/r$ cannot be converted to $\mathrm{erg}$ since Gaussian system uses $4\...
4
votes
0answers
49 views

Force Solve to respect unit system

I give Solve quantities in FPS and it returns resulting quantities in SI, necessitating that I add an entire section to my workflow where I pick apart the solution ...
4
votes
0answers
57 views

Does AroundReplace work with Quantity?

When I try to use AroundReplace with units it issues Around::compat message and outputs something strange: ...
4
votes
0answers
38 views

Any progress on Plots of Quantities?

Plots of quantities still don't seem to work. I've implemented the one suggestion people have: use Evaluate, but now the values of my plots are just completely off ...
4
votes
0answers
41 views

Preventing changes in TimeObject's TimeZone with subsequent operations

Is there an option or method to lock TimeZone in TimeObjects? For example, ...
4
votes
0answers
97 views

Timeout in implicit Wolfram|Alpha calls, but WolframAlpha works

In general we expect this to work: Quantity["Speed of light"] Quantity[1, "SpeedOfLight"] And it does because it can make use of Wolfram|Alpha. Oddly, though, ...
4
votes
0answers
165 views

Setting default units for output

Is it possible to set a default set of units for output? I've just discovered the joys of units and Quantity. Ideally, I'd like to be able to tell Mathematica to ...
4
votes
0answers
70 views

Plotting InterpolationFunction over Quantities

What's the proper syntax to plot Interpolation functions defined over Quantities? points = {{0, 0}, {1, 1}, {2, 3}, {3, 4}, {4, 3}, {5, 0}}; Change domain to ...
4
votes
0answers
63 views

QuantityForm does not work with MixedRadixQuantity?

Bug introduced after 9.0 and in 10.1 or earlier, and persisting through 11.2 or later From 10.1 to 10.3.1, QuantityForm[q, "Abbreviation"] outputs From 10.4 to 11....
4
votes
0answers
58 views

Unit of output changes when constant quantity is moved over integral

Bug introduced in 9.0 and persisting through 11.0.1 or later Quantity is new in 9.0. Why do these two expressions give the same result in different units? In: <...
4
votes
0answers
111 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
0answers
34 views

How to stop Quantity from evaluating

I'm trying to get an expression to display, without it evaluating it's internal arguments, but for some reason, when given the Quantity function, HoldForm doesn't seem to do what I expect: Code ...
3
votes
0answers
67 views

UnitConvert having trouble multiplying Boltzmann's Constant with Fahrenheit?

T:=70 Quantity["DegreesFahrenheit"] kb:=Quantity["BoltzmannConstant"] UnitConvert[kb UnitConvert[T, "Kelvins"], "Electronvolts"] // N Returns 0.0253575 eV while <...
3
votes
0answers
95 views

Can FindFit be used with units?

I am trying to use the units capabilities of Mathematica throughout a course that I am teaching, but am finding that it isn't uniformly implemented across many functions. In particular, I would love ...
3
votes
0answers
135 views

How to insert a formula to FormulaData?

Unit Checking Demo In order to throw a unit error,we run the code ...
3
votes
0answers
274 views

Physical constants seems broken in 10.3

For example, if I just enter Quantity["GravitationalConstant"], then the result is this ...
3
votes
0answers
58 views

TimeSeriesInsert issue with Quantity expressions

Solved in Mathematica v10.3 This first sample code works as expected: ...
3
votes
0answers
111 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
0answers
50 views

How to get Integrate to determine units

In a similar fashion to the question asked here, I am having trouble trying to get Integrate to correctly determine the units of the integrand: Here I have plugged in specific values into the general ...
2
votes
0answers
82 views

Why aren't radians dimensionless?

α = Quantity[-3, ("Radians")/("Seconds")^2]; ω = Quantity[-4, ("Radians")/("Seconds")]; r = Quantity[2, "Feet"]; at = α r an = ω^2 r a = Sqrt[an^2 + at^2] ...
2
votes
0answers
52 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
0answers
35 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
0answers
44 views

Is there a way to include holiday calendar into Quantity system?

Suppose I have a long list of business hours but in different denominations for postings like as follows. If I just use the vanilla UnitConvert it just does a ...
2
votes
0answers
148 views

Insert a Quantity Unit literal in TraditionalForm

Is there a keyboard shortcut for creating something like the result of this: Quantity["Kilograms" * ("Meters")^2 / ("Seconds")^2] After copying the result to a <...
2
votes
0answers
84 views

Will aliasing the Quantity and UnitConvert functions to “in” and “to” create problems?

It seems that there is a lot of interest in enhancing the use of units in Mathematica; various solutions in the name of brevity, correctness, and general utility have been demonstrated. I've begun ...
1
vote
0answers
56 views

Is there a reason why “Revolutions” and “Radians” or “AngularDegrees” are not CompatibleUnitQ?

I understand that keeping a consistent unit framework across multiple domains is complicated and not everyone will be satisfied with the choices made, like when people ask why "Radians" are ...
1
vote
0answers
21 views

Issue displaying units with Quantity[] inside bar legend

Quantity[] is displaying some inconsistent behaviour when used in BarLegend[]. Compare the following two examples: ...
1
vote
0answers
30 views

Plotting a quantity-based function doesn't work

Creating the function: ...
1
vote
0answers
31 views

Computing matrix eigenvalues with units

I apologize if this is a basic question or if I am not giving enough detail. I'm trying to solve for the eigenvalues of a matrix with matrix elements that have units. ...
1
vote
0answers
23 views

What is the reason StandardDeviation doesn't cooperate with Quantity “Percent”?

Consider the following list of numbers y = {13, 0.2, 11.201}; Turning y into a list of ...
1
vote
0answers
60 views

UnitSimplify rules?

Code as following: ...
1
vote
0answers
50 views

Manipulating a ParametricFunction to handle units

I have a pretty nice way to handle units on a result from NDSolve, which basically consists of converting all of the units to SI, stripping them, calling NDSolve, and then putting the units back. I'll ...
1
vote
0answers
32 views

SemanticImport changes “string” type to “quantity” type--how to change during import or after import?

This question may overlap with other questions about the quirks of SemanticImport, but I don't see this specific wrinkle on StackExchange and I hope it will be a simple answer to help me and others ...
1
vote
0answers
42 views

Plot[func,…] shows incorrect function, but ListPlot@Table[func,…] is correct

When trying to Plot the function 1/(1 + E^(((e + Quantity[-7.05, "Electronvolts"]) *(Quantity[1, 1/("BoltzmannConstant")]))/T)) I get an incorrect plot ...
1
vote
0answers
41 views

Buggy IntervalUnion with Quantities?

IntervalUnion can give wrong output when used with Quantity: ...
1
vote
0answers
63 views

How to get a conversion factor in new system of unit

There is some numerical relation $I = \frac{c}{8\pi} E^2$ between the wave intensity $I$ and the electric field strength $E$ written in CGS (centimetre, gram, second) system of units, where $c$ is ...
1
vote
0answers
34 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 ...
1
vote
0answers
120 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 ...
1
vote
0answers
100 views

Geodesy without units?

Suppose I'm interested in the latitude of Los Angeles and I do the following: ...
0
votes
0answers
36 views

How to deal with units while plot?

I am plotting a bistable plot and the given code is giving me the bistable plot. But there is one problem in the plot. In the x-axis "P0" is multiplied with 10^(3) p. second. and in the y-axis, the ...
0
votes
0answers
31 views

Problem with UnitConvert with a list

I'm studying this part of the course units convert I have two list the first: is in Megaparsec and I need to transform it to kilometers ...
0
votes
0answers
52 views

Interpreter for Quantities without magnitude

When using a quantity interpreter on a unit without magnitude, the interpreter fails, but works fine on quantities with magnitudes. Ex: ...
0
votes
0answers
29 views

How to format time durations for media clips {audio, video, music, science etc}

Mathematica has powerful date, time and timeseries functions and options. Yet they all seem to be tightly tied to Time in global clock-calendar-astronomic perception. I need to do basic time-duration ...
0
votes
0answers
40 views

Set default unit for information rate and others

I am using mathematica to convert units to canonical form, like I have 0.2 KBYTE/s and I want to get 200. So I want to see all '...