Time & Rate Unit Conversion Function

버전 1.2.0.0 (2.7 KB) 작성자: Sky Sartorius
Converts time and/or rate units using same syntax as aerospace toolbox conversion functions.
다운로드 수: 846
업데이트 날짜: 2010/8/9

라이선스 보기

Designed to supplement the conversion functions found in the aerospace toolbox (aerospace toolbox not required), CONVTIME handles time and rate units from nanosecond to millennium and per nanosecond to per millennium.

Unlike the aerospace toolbox functions, it is not necessary to specify output units, as CONVTIME will by default convert to the SI seconds or per second.

Allowable UI and UO strings (not case sensitive):
'ns'
'us','µs'
'ms'
's','sec'
'm','min'
'h','hr','hour'
'd','day'
'wk','week'
'y','yr','year'
'dec','decade'
'cent','century'
'millen','millennium'

Examples included in help:

Convert a matrix of time values from years to hours:
out = convtime([1 3; 4 5], 'year', 'hr')

Convert flow rate 0.2 gallons/second to gallons/day:
out = convtime(0.2, '/s', '/day')

Convert fuel burn rate 5000 lbm/hour to kg/s using aerospace toolbox:
out = convtime( convmass(5000, 'lbm', 'kg'), '/hour', '/s' )

If manufacturing 800 items per hour, find how many seconds are required to manufacture an item (convert 800 items/hour to seconds/item):
out = convtime(800, '/h', 's')

If 65 seconds elapse between mile markers on the highway, find the speed in miles/hour:
speed = convtime(65, 'sec', '/hour')

인용 양식

Sky Sartorius (2024). Time & Rate Unit Conversion Function (https://www.mathworks.com/matlabcentral/fileexchange/28204-time-rate-unit-conversion-function), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Unit Conversions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

input units may now be of opposite type as output units (e.g. rate in, time out). Appropriate examples added. Other small additions.

1.1.0.0

Significantly more elegant coding scheme which runs up to twice as fast as before

1.0.0.0