Wolfram言語

単位と日付

数量配列

QuantityArrayは,Quantityオブジェクトの配列の効率的な保存と操作を可能にし,物理単位を持つデータの解析に理想的である.系を通しての積分を続けることで,いくつかの関数がQuantityArrayオブジェクトを理解し,返すようになった.

QuantityDistributionオブジェクトからサンプルを取る.

In[1]:=
Click for copyable input
RandomVariate[ParetoDistribution[Quantity[500., "USDollars"], 4], 300]
Out[1]=

QuantityArrayオブジェクトはQuantity要素の正規配列と同じである.

In[2]:=
Click for copyable input
RandomVariate[ParetoDistribution[Quantity[500., "USDollars"], 4], 300]; Normal[Take[%, 10]]
Out[2]=

高度データや磁場データのような地理データを計算あるいはダウンロードする.

In[3]:=
Click for copyable input
GeoElevationData[Entity["Country", "UnitedStates"]]
Out[3]=
In[4]:=
Click for copyable input
GeomagneticModelData[ Entity["GeographicRegion", "Antarctica"], "Magnitude"]
Out[4]=

経緯度角の配列を操作する.

In[5]:=
Click for copyable input
GeoElevationData[ Entity["Country", "UnitedStates"], "Undulation", GeoPosition]
Out[5]=
In[6]:=
Click for copyable input
GeoElevationData[ Entity["Country", "UnitedStates"], "Undulation", GeoPosition]; LatitudeLongitude[%]
Out[6]=

中国の重力場についての垂直成分のデータ配列を取得する.

In[7]:=
Click for copyable input
data = GeogravityModelData[Entity["Country", "China"], "DownComponent"]
Out[7]=

この地域の地球の重力場が標準の9.81とどのように異なるかを調べる.

In[8]:=
Click for copyable input
contourplot = ListContourPlot[data - Quantity[1, "StandardAccelerationOfGravity"], Frame -> False, PlotRangePadding -> 0, ColorFunction -> "SolarColors"]
Out[8]=

中国の地図に等高線プロットを重ねる.

完全なWolfram言語入力を表示する
In[9]:=
Click for copyable input
Legended[GeoGraphics[{GeoStyling[{"GeoImage", contourplot}, Opacity[0.8]], Polygon[Entity["Country", "China"]]}, ImageSize -> 500, GeoRange -> Quantity[2200, "Kilometers"], GeoZoomLevel -> 5], BarLegend[{"SolarColors", MinMax@Flatten[QuantityMagnitude@data]}]]
Out[9]=

関連する例

de en es fr ko pt-br ru zh