imat_fn/chgunits


Purpose

Convert an imat_fn to a different unit system.

Syntax

g=chgunits(f,from,to)

Description

CHGUNITS converts an imat_fn to a different system of units. This potentially affects the abscissa values (Abscissa, AbscissaMin, and AbscissaInc attributes), the ordinate values (Ordinate, OrdOffsetReal, OrdOffsetImag, OrdScaleReal, and OrdScaleImag attributes), and Z-axis values (ZGeneralValue attribute).

The from argument is the unit system that f is expressed in currently. The to argument is the desired unit system (if to is omitted, the current unit system is assumed). The unit system arguments should either be unit strings (such as 'SI') or should be 5x1 vectors of unit conversion factors as returned by the getunits function.

If you follow the recommended practice of setting your units at the start of a session and maintaining consistency, you should not need to use this function.

Examples

>> f=chgunits(f,'mm','in');     % Change f from MM to IN

See Also

getunits, setunits