Main Content

Mass Conversion

Convert from mass units to desired mass units

  • Mass Conversion block

Libraries:
Aerospace Blockset / Utilities / Unit Conversions

Description

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

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

Ports

Input

expand all

Mass, specified as a scalar or array, in initial mass units.

Dependencies

The input port label depends on the Initial unit setting.

Data Types: double

Output

expand all

Mass, returned as a scalar or array, in final mass units.

Dependencies

The output port label depends on the Final unit setting.

Data Types: double

Parameters

expand all

Input units, specified as.

lbm Pound mass
kg Kilograms
slug Slugs

Dependencies

The input port label depends on the Initial unit setting.

Programmatic Use

Block Parameter: IU
Type: character vector
Values: 'lbm' | 'kg' | 'slug'
Default: 'lbm'

Output units, specified as:

lbm Pound mass
kg Kilograms
slug Slugs

Dependencies

The output port label depends on the Final unit setting.

Programmatic Use

Block Parameter: OU
Type: character vector
Values: 'lbm' | 'kg' | 'slug'
Default: 'kg'

Extended Capabilities

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

Version History

Introduced before R2006a