k-Wave Toolbox
k-Wave Toolbox Previous   Next

logCompression

Log compress an input signal

Syntax

signal = logCompression(signal, a)
signal = logCompression(signal, a, normalise)

Description

logCompression compresses the input signal using the expression signal = log10(1 + a*signal)./log10(1 + a).

Inputs

signal

input signal

a

compression factor

Optional Inputs

normalise

Boolean controlling whether the maximum of the input signal is normalised to unity before compression (default = false). If set to true, the original magnitude is restored after compression.

Outputs

signal

log compressed signal

See Also

log10


© 2009-2014 Bradley Treeby and Ben Cox.