Quantcast
Channel: Active questions tagged units - Mathematica Stack Exchange
Browsing latest articles
Browse All 34 View Live

Image may be NSFW.
Clik here to view.

Plotting a function with units gives two different results

With the following code block, I plot a function with units in it in two different ways. Both ways should do the same in my understanding of the documentation.cm = Quantity["Centimeters"];f[x_] :=...

View Article



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

View Article

StreamPlot "Part is not a Graphics primitive or directive."

I am trying to use StreamPlot with units. Here is a minimal example to produce the error "Part is not a Graphics primitive or directive." :g[x_] := UnitSimplify[UnitConvert[x...

View Article

How to convert units from percent per year to real number with CountryData?...

I have CountryData coming in via e.g.Entity["Country", "Australia"][ EntityProperty["Country", "GDP", {"CurrencyUnit" -> "Constant2000USDollar", "TimeSeriesOperator" -> "AnnualGrowthRate"}...

View Article

Image may be NSFW.
Clik here to view.

MixedUnit in Fractions

Is there a way to have a more common output format on MixedUnit?Quantity[317.2,MixedUnit[{"Minutes"/"Kilometers", "Seconds"/"Kilometers"}]]givesI would love to have some unit like...

View Article


Accuracy and precision control for a simple calculation [closed]

Consider a very simple calculation: $231 \times (2.54) ^ 3$, which is the number of cubic cm in a US gallon.On my phone app calculator I got the exact answer, which is $3785.411784$.On Mathematica,...

View Article

Image may be NSFW.
Clik here to view.

A problem about the integration of blackbody radiation law using FormulaData....

I am trying to integrate blackbody radiation law under 1500 Kelvin using the FormulaData command.The integration seems not to work properly after I designate the integration range. Mathematica does not...

View Article

mesh / region creation in unit meters or mm:

How can we know the unit of mesh or create a mesh in specified length units:such as, for example I have: bmesh = ToBoundaryMesh["Coordinates" -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}, {1/6, 1/6}, {5/6,...

View Article


Image may be NSFW.
Clik here to view.

Importing scientific data with uncertainties and units

I want to import scientific data from a CSV file. The data are length measurements in centimeters with uncertainties. I want to import the data with uncertainties and units into a vector - please see...

View Article


Why does different nondimensionalizations give different results? Although...

I have some problems with the non-dimensionalization of the Hamiltonian of motion in a Coulomb field.The Hamiltonian has a following form:$$H=-\frac{\hbar^2}{2\mu^*} \Delta_r-\frac{e^2}{\epsilon_0...

View Article

Image may be NSFW.
Clik here to view.

Solve not working with cross product with units

I recently asked this question about using Solve with cross product.Solve not working when doing cross-productWhen I use the units in the definition of the variables, I am not able to get an answer.x =...

View Article

Issue with unit conversion

I am getting an error converting energy unit Pa*m^3 (Pascal * Meters^3) to J (Joules).pi = Quantity[2.00*10^5, "Pascals"];Vi = Quantity[4.00*10^-6, ("Meters")^3];Vf = Quantity[8.00*10^-6,...

View Article

Image may be NSFW.
Clik here to view.

Currency Interpretation for VND

Bug introduced in v12.2.0 or earlier, persisting through v13.2.1. Case number: 4973722As I was helping an OP with a question involving Vietnamese currency, I didn't realize at the time that the...

View Article


Image may be NSFW.
Clik here to view.

Dealing with exponents that contain units?

Many of the equations I deal with involve powers of quantities which contain units. However, when the exponent contains units (e.g., E^Quantity[3, "Joules"]), Mathematica will not evaluate it "fully."...

View Article

Image may be NSFW.
Clik here to view.

ToPolarCoordinates not working with units

I am trying to convert some quantities with units from rectangular to polar coordinates (to get the magnitude and angle). It seems that ToPolarCoordinates command does not calculate the angle when...

View Article


Image may be NSFW.
Clik here to view.

How can the units of the "AtomCoordinates" in a Molecule be changed while...

Mathematica provides the Molecule function that can be visualized with MoleculePlot3D since version 12.0. Before, importing "XYZ" files would produce a Graphics3D object immediately. In this object,...

View Article

quantity of `Around` with "DimensionlessUnit"

Quantity[1, "DimensionlessUnit"]gives pure number1However,Quantity[Around[1, 0.1], "DimensionlessUnit"]still givesQuantity[Around[0.01`, 0.001`], "DimensionlessUnit"]instead of pure Around expression....

View Article


Unit scaling: human readable Quantity units

Consider some calculation yielding Quantity[x,"B"] as output ("B" interpreted as byte).Is there a way to automatically convert this to the unit "GB" or "MB" or "TB" etc as the case may be. i.e. instead...

View Article

Image may be NSFW.
Clik here to view.

How to prohibit automatic DegreesCelsius converting to Kelvins?

On this wiki page, temperature conversion is presented clearly. For example.It also warns that we should take care of temperature difference conversion which is a different conversion asIt is critical...

View Article

Image may be NSFW.
Clik here to view.

Problem using UnitConvert

As we know in physics, power = torque * (angular velocity). But when I use UnitConvert to convert a quantity expressing power/(angular velocity) into newton-meters, UnitConvert fails.How can they be...

View Article

Image may be NSFW.
Clik here to view.

Why is ExternalEvaluate running the command Quantity[471.04`, "Kilobytes"] on...

Raspberry Pi 4B with 32 bit Raspberry Pi OS Full:Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/LinuxMathematica for Raspberry Pi 13.1The...

View Article


Image may be NSFW.
Clik here to view.

Create by hand a formatted form of quantities

If I evaluate the following cell:Quantity["PlanckConstant"]I get as an output a very concise format of this quantity:Also, compare the legibility of these two cells:I want to find a way to create...

View Article


Cases syntax when expression sought is a Quantity

From the following list I wish to extract those cases for which the magnitude of a quantity is greater than zero for which I would like to then create a DateListPlot. list = {{DateObject[{2017, 01},...

View Article

How to find all InformationUnits by code method?

As I know, the "Megabytes" and "Gigabits" both are "InformationUnit":UnitDimensions["Megabytes"]UnitDimensions["Gigabits"]{{"InformationUnit", 1}}{{"InformationUnit", 1}}Is there any method to find all...

View Article

How to handle units of measurement?

I'm trying to understand how Mathematica handles units of measurement.That is I expect that a calculation should return a certain unit, but I don't succeed. Let's consider this example:(314.159 m...

View Article


QuantityArray vs Array of Quantities

If memory and speed are not concerns, is there a reason to use QuantityArray instead of an array of quantities?

View Article

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 Simplify[] nor UnitSimplify[] to...

View Article

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 rather unconventional and in Wolfram Alpha it is done as kW h, for...

View Article

Clear Guidelines for Symbolic Calculation With Units?

The following notebook performs a relatively simple physical calculation interacting position, velocity and acceleration of two charged point particles according to Weber electrodynamics.It is simple...

View Article



Integrate & Unit: unable to determine the units of quantities

In a Wolfram Notebook,I declare a function F1[x]=1/x where x is in "Meters"F1[X_] = With[{x=Quantity[X,"Meters"]},1/x]I integrate F1. Everything is Ok.NIntegrate[F1[r],{r,1,2}]But with the function...

View Article
Browsing latest articles
Browse All 34 View Live




Latest Images