Working with physical properties and units in Matlab

版本 1.0.0.0 (6.0 KB) 作者: Alex
This submission provides a tool for working with physical units in Matlab.
230.0 次下载
更新时间 2013/3/5

查看许可证

Working with units:
>> s = unit('120 k:m') % define distance
s = 120000 m
>> t = unit('1 h') % define time interval
t = 3600 s
>> v = s / t % compute velocity
v = 33.3333 m s-1
>> v.ConvertToDisp('k:m/h') % show v in kilometers per hour
v = 120 k:m/h
>> v.ConvertToDisp('mi/h') % show v in miles per hour
v = 74.5645 mi/h

Convert the gas constant R=8.314 J/mol K to british thermal units per pound-mole and Rankine:
>> unit('8.314 J/mol K').ConvertTo('btu/lb-mol R')
ans =
6.4339

引用格式

Alex (2024). Working with physical properties and units in Matlab (https://www.mathworks.com/matlabcentral/fileexchange/40633-working-with-physical-properties-and-units-in-matlab), MATLAB Central File Exchange. 检索来源 .

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

Community Treasure Hunt

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

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