The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [units]

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

34 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
181 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
441 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
70 views

Join on QuantityArray

I need to merge two QuantityArray objects of mixed type. My first attempt looks something like: ...
5
votes
0answers
60 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
94 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
290 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
39 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
60 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
61 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
106 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
116 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 ...
3
votes
0answers
82 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
129 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
262 views

Physical constants seems broken in 10.3

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

TimeSeriesInsert issue with Quantity expressions

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

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, ...
2
votes
0answers
147 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
83 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
40 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
24 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
63 views

NDSolve and Quantity[]

I'm working on a set of relatively basic ODEs of a physical pendulum and motor: $$\left\{\text{jb} \theta ''(t\text{s})+\text{rb} \theta '(t\text{s})+\alpha \sin (\theta (t\text{s}))+\mu \tan ^{-1}\...
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
35 views

Buggy IntervalUnion with Quantities?

IntervalUnion can give wrong output when used with Quantity: ...
1
vote
0answers
56 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
33 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
110 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
99 views

Geodesy without units?

Suppose I'm interested in the latitude of Los Angeles and I do the following: ...
0
votes
0answers
27 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
1answer
67 views

How can I add units to variables inside Manipulate?

I've created a Manipulate expression with many variables. I would like each of these variables to have associated units as in the standard Quantity[Value,"Unit"] so that I can easily enter the values ...
0
votes
0answers
44 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 '...