units.m

版本 1.0.0.0 (3.5 KB) 作者: Henning Ressing
Converts physical unit1 into unit2.
5.1K 次下载
更新时间 2003/11/10

无许可证

y = units(x,'unit1','unit2') - Converts x from physical unit1 to unit2

example: units(1,'in','mm') = 25.4

The following units are supported:
Acceleration: m/s^2, cm/s^2, mm/s^2, ft/s^2, in/s^2, G
Angle: rad, deg, rev
Area: km^2, m^2, cm^2, mm^2, ym^2 (square-micrometer), sq-mile, sq-yd, sq-ft, sq-in,
acres, ha, ar
Area Moment of Inertia: m^4, cm^4, mm^4, ft^4, in^4
Density: t/m^3 (metric), kg/m^3, g/cm^3, g/mm^3, lbs/ft^3 lbs/in^3, lbs/galUS, lbs/galUK
Energy, Work, Torque: GJ, MJ, kJ, J, mJ, Nm, Ncm, Nmm, kWh, Wh, Ws, lb-ft, lb-in, oz-in,Btu,
Btu, cal, kcal, eV
Force: MN, kN, N, dyne, lbf, kip
Fuel Consumption: l/100km, miles/galUS
Frequency, Angular Velocity: GHz, MHz, kHz, Hz, 1/s, 1/min, 1/h, rad/s, deg/s, rpm
Length: km, m, dm, cm, mm, ym (micrometer), nm, mile, yard, ft, in, mill,
Angstrom, light-year
Mass: t (metric), tUS, tUK, kg, g, mg, yg (microgram), ng, lbs, oz
Mass Moment of Inertia: kg*m^2, kg*cm^2, kg*mm^2, g*m^2, g*cm^2, g*mm^2, lb*ft^2, lb*in^2
Power: GW, MW, kW, W, mW, hp, Btu/h, Btu/s, kcal/h, J/h
Pressure, Stress: GPa, MPa, kPa, hPa, Pa, bar, mbar, atm, dyne/cm^2, ksi, psi, mmHg, mmH2O
Strain: m/m, mm/m, ym/m (micrometer/m), nm/m, %, o/oo, in/in, mill/in
Stress Intensity Factor: MPa*m^1/2, MPa*mm^1/2, ksi*in^1/2, psi*in^1/2
Temperature: degK, degC, degF, degR
Time: yr (365 days), mth (30 days), wk, day, hr, min, s, ms, ys (microsecond), ns
Velocity: km/s, km/h, m/s, cm/s, mm/s, m/min, mm/min, mps, mph, ft/s, in/s, ft/min,
in/min, Mach, knots
Viscosity: Ns/m^2, poise, centipoise, lbfs/sq-ft
Volume: km^3, m^3, cm^3, mm^3, ym^3, cu-mile, cu-ft, cu-in, l, cl, ml, galUS, galUK,
pint (liquid US), quart (liquid US), fl-oz (liquid US)

Metric Prefixes: Yotta, Zetta, Exa, Peta, Terra, Giga, Mega, Myria, kilo, hecto, 1
deci, centi, milli, micro, nano, pico, femto, atto, zepto, yocto

CONSISTENCY OF UNITS IS NOT CHECKED FOR!
(i.e., units(1,'m','kg') = 1, which is of course nonsense.)

引用格式

Henning Ressing (2024). units.m (https://www.mathworks.com/matlabcentral/fileexchange/4093-units-m), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R10
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Automotive 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

- added units of strain
- fixed forgotten semicolon