MATLAB ヘルプ センター
Remove unit
removeUnit(unit)
removeUnit(unit) removes the symbolic unit unit. You can remove only user-defined units created with newUnit. You cannot remove predefined units. If unit is a vector, removeUnit removes all units in unit.
unit
newUnit
removeUnit
example
collapse all
Remove units you define by using removeUnit. Create the unit warp3, use the unit in calculations, and then remove the unit.
warp3
Define the unit warp3 as 3 times the speed of light.
u = symunit; warp3 = newUnit('warp3',3*u.c_0)
warp3 = [warp3]
Convert 1e10 meter per second to u.warp3.
1e10
u.warp3
speed = rewrite(1e10*u.m/u.s,u.warp3)
speed = (5000000000/449688687)*[warp3]
After calculations, remove the unit u.warp3 by using removeUnit.
removeUnit(u.warp3)
Conversion to u.warp3 now throws an error.
Unit name, specified as a symbolic unit or a vector of symbolic units.
Introduced in R2017b
checkUnits | isUnit | newUnit | newUnitSystem | symunit
checkUnits
isUnit
newUnitSystem
symunit
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
ヨーロッパ
アジア太平洋地域
最寄りの営業オフィスへのお問い合わせ