Main Content

Temperature Conversion

Convert from temperature units to desired temperature units

  • Temperature Conversion block

Libraries:
Aerospace Blockset / Utilities / Unit Conversions

Description

The Temperature Conversion block computes the conversion factor from specified input temperature units to specified output temperature units and applies the conversion factor to the input signal.

The Temperature Conversion block port labels change based on the input and output units selected from the Initial unit and the Final unit lists.

Ports

Input

expand all

Temperature, specified as a scalar or array, in initial temperature units.

Dependencies

The input port label depends on the Initial unit setting.

Data Types: double

Output

expand all

Temperature, returned as a scalar or array, in final temperature units.

Dependencies

The output port label depends on the Final unit setting.

Data Types: double

Parameters

expand all

Input units, specified as:

K Kelvin
F Degrees Fahrenheit
C Degrees Celsius
R Degrees Rankine

Dependencies

The input port label depends on the Initial unit setting.

Programmatic Use

Block Parameter: IU
Type: character vector
Values: 'K' | 'F' | 'C' | 'R'
Default: 'R'

Output units, specified as:

K Kelvin
F Degrees Fahrenheit
C Degrees Celsius
R Degrees Rankine

Dependencies

The output port label depends on the Final unit setting.

Programmatic Use

Block Parameter: OU
Type: character vector
Values: 'K' | 'F' | 'C' | 'R'
Default: 'K'

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced before R2006a