k-Wave Toolbox

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