unitInfo
測定単位の情報
説明
unitInfo
は可能な物理次元の配列を返します。
A = unitInfo(___)
は、前の構文の入力引数のいずれかを使用して A
に出力を返します。次元は文字列として返され、単位はシンボリック単位として返されます。
例
単位と次元の情報の検索
単位 u.Wb
の情報を検索します。ここで、u = symunit
です。関数 unitInfo
は Wb
が磁束の SI 単位であることを指定します。
u = symunit; unitInfo(u.Wb)
weber - a physical unit of magnetic flux. ['SI'] Get all units for measuring 'MagneticFlux' by calling unitInfo('MagneticFlux'). SI units accept all SI prefixes. For details, see SI Unit Prefixes List.
記述のように、'MagneticFlux'
に可能なすべての単位を検索します。
unitInfo('MagneticFlux')
All units of dimension 'MagneticFlux': abWb - abweber Mx - maxwell phi_0 - magnetic flux quantum statWb - statweber Wb - weber ['SI'] Get the base SI units of any unit above by calling rewrite(<unit>,'SI'). SI units accept all SI prefixes. For details, see SI Unit Prefixes List.
unitInfo
は複合単位に関する情報も返します。u.m/u.s^2
の情報を検索します。
unitInfo(u.m/u.s^2)
meter per square second - a physical unit of acceleration. ['SI'] Get all units for measuring 'Acceleration' by calling unitInfo('Acceleration'). SI units accept all SI prefixes. For details, see SI Unit Prefixes List.
可能なすべての物理次元の検索
unitInfo
を入力引数なしで使用して、可能なすべての次元を返します。
unitInfo
"AbsorbedDose" "AbsorbedDoseOrDoseEquivalent" "AbsorbedDoseRate" "Acceleration" ... ... "Length" "Luminance" "LuminousEfficacy" ... ... "Torque" "Velocity" "Volume"
単位と次元の情報の使用
unitInfo
が返した情報を、出力提供のたびに利用するよう保存します。
u.C
の次元を保存します。
u = symunit; dimC = unitInfo(u.C)
dimC = "ElectricCharge"
次元 dimC
のすべての単位を検索および保存します。
unitsEC = unitInfo(dimC)
unitsEC = [abC] [C] [e] [Fr] [statC]
unitsEC
の 3 番目の単位の情報を検索します。
unitInfo(unitsEC(3))
elementary charge - a physical unit of electric charge. Get all units for measuring 'ElectricCharge' by calling unitInfo('ElectricCharge').
[e]
を保存します。次に 1 クーロンの電荷の電子数を求めます。
electronCharge = unitsEC(3); numElectrons = simplify(u.C/electronCharge)
numElectrons = 5000000000000000000000000000/801088317
1 クーロン内には約 6.24 x 1018 個の電子があることを、高精度のシンボリックな結果を double に変換することで示します。
numElectrons = double(numElectrons)
numElectrons = 6.2415e+18
入力引数
バージョン履歴
R2017b で導入
参考
外部の Web サイト
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)