.php xmlns="http://www.w3.org/1999/.php"> - k-Wave MATLAB Toolbox
k-Wave Toolbox

scaleSI

Scale a number to nearest SI unit prefix.

Syntax

x_sc = scaleSI(x)
[x_sc, scale] = scaleSI(x)
[x_sc, scale, prefix] = scaleSI(x)
[x_sc, scale, prefix, prefix_fullname] = scaleSI(x)

Description

scaleSI scales the input x to use the nearest SI unit prefix while keeping 1000 > x > 1. For example, scaleSI(0.00001) would give x_sc = '10u', scale = 1e6, prefix = 'u', and prefix_fullname = 'micro'.

Inputs

x number to scale

Outputs

x_sc string of scaled input and prefix
scale numeric scale factor
prefix single character scale prefix
prefix_fullname full SI name for prefix

Examples

See Also

scaleTime
<.php>