Temperature Conversion Toolbox

Convert temperature between Fahrenheit, Celsius, Kelvin, and Rankine
807.0 次下载
更新时间 2011/7/15

查看许可证

This toolbox contains 12 very simple functions that will convert between 4 very popular units of measure of temperature. The supported units are as follows:

1. Fahrenheit
2. Celsius
3. Rankine
4. Kelvin

These functions are called much like their distance-converting counterparts (i.e. nm2km, nm2sm, etc).

The convention for naming these functions are as follow:

[unitsFrom]2[unitsTo]

where [unitsFrom] and [unitsTo] can be any one of the following tags:

1. far (Fahrenheit)
2. cel (Celsius)
3. rank (Rankine)
4. kel (Kelvin)

For example, to convert from Fahrenheit to Celsius.

temp_far = 100;
temp_cel = far2cel(temp_far);
disp(temp_cel)

Also included is a function called tempdim. This is very similar to MATLAB's distdim. It takes in the temperature, the units it is in, and the units you want to convert it to.

tempOut = tempdim(tempIn,unitsFrom,unitsTo)

引用格式

Jonathan Sullivan (2024). Temperature Conversion Toolbox (https://www.mathworks.com/matlabcentral/fileexchange/32218-temperature-conversion-toolbox), MATLAB Central File Exchange. 检索来源 .

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

启发作品: Unit Converters

Community Treasure Hunt

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

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

Fixed misspelling in the comments of tempdim

1.0.0.0