ヘルプ センターヘルプ センター
単位の削除
removeUnit(unit)
例
removeUnit(unit) はシンボリック単位 unit を削除します。削除できるのは newUnit で作成したユーザー定義の単位のみです。事前定義されている単位は削除できません。unit がベクトルの場合、removeUnit は unit 内のすべての単位を削除します。
unit
newUnit
removeUnit
すべて折りたたむ
removeUnit を使用して、定義した単位を削除します。単位 warp3 を作成し、計算で単位を使用した後、単位を削除します。
warp3
単位 warp3 を光速の 3 倍で定義します。
u = symunit; warp3 = newUnit('warp3',3*u.c_0)
warp3 = [warp3]
1e10 メートル毎秒を u.warp3 に変換します。
1e10
u.warp3
speed = rewrite(1e10*u.m/u.s,u.warp3)
speed = (5000000000/449688687)*[warp3]
計算が完了したら、removeUnit を使用して単位 u.warp3 を削除します。
removeUnit(u.warp3)
これで、u.warp3 への変換はエラーをスローします。
単位の名前。シンボリック単位またはシンボリック単位のベクトルとして指定します。
R2017b で導入
checkUnits | isUnit | newUnit | newUnitSystem | symunit
checkUnits
isUnit
newUnitSystem
symunit
次の 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:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office