k-Wave Toolbox
k-Wave Toolbox Previous   Next

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


© 2009-2014 Bradley Treeby and Ben Cox.