主要内容

unitSystems

列出可用单位制

语法

描述

例子

unitSystems返回可用单位系统的行向量。

例子

全部折叠

通过使用获得可用的单位系统unitSystems.添加一个自定义单元系统并进行检查unitSystems将其列为可用。

找到默认可用的单元系统。

unitSystems
ans = 1×6 string array "CGS" "EMU" "ESU" "GU" "SI" "US"

添加一个修改SI基单位的自定义单位系统。有关详细信息,请参见newUnitSystem单位转换和单位系统

u = symunit;SIUnits = baseUnits (SI);newUnits =潜艇(SIUnits (u。美国m]、[u。公里u.hr]);newUnitSystem (SI_km_hr, newUnits)
ans = " SI_km_hr "

通过使用,检查新的单元系统是否可用unitSystems

unitSystems
ans = 1×7 string array "CGS" "EMU" "ESU" "GU" "SI" "SI_km_hr" "US"

计算完成后,将新的机组系统移走,并检查其是否不可用。

removeUnitSystem(“SI_km_hr”);unitSystems
ans = 1×6 string array "CGS" "EMU" "ESU" "GU" "SI" "US"
介绍了R2017b