QuantityArray

QuantityArray[mags,unit]

represents an array of quantities with magnitudes mags and common unit.

QuantityArray[mags,{unit1,unit2,}]

represents an array of lists of quantities with units {unit1,unit2,}.

QuantityArray[quants]

converts an array of Quantity objects into a single QuantityArray object.

Details

Examples

open allclose all

Basic Examples  (3)

A list of lengths, all given in meters:

In[1]:=
Click for copyable input
Out[1]=

Extract its magnitudes and units separately:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Normalize the quantity array:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]//InputForm=

A list of pairs {time,length}:

In[1]:=
Click for copyable input
Out[1]=

Extract its magnitudes and units separately:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=

Convert units:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Convert a normal array of quantities into a QuantityArray representation:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (5)

Properties & Relations  (8)

See Also

Quantity  Normal  MapThread  QuantityMagnitude  QuantityUnit  UnitConvert  QuantityDistribution

Introduced in 2015
(10.1)