This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

A-Law Compressor

Implement A-law compressor for source coding


Source Coding


The A-Law Compressor block implements an A-law compressor for the input signal. The formula for the A-law compressor is

y={A|x|1+logAsgn(x)for 0|x|VAV(1+log(A|x|/V))1+logAsgn(x)for VA<|x|V

where A is the A-law parameter of the compressor, V is the peak signal magnitude for x, log is the natural logarithm, and sgn is the sign function.

The most commonly used A value is 87.6.

The input can have any shape or frame status. This block processes each vector element independently.


A value

The A-law parameter of the compressor.

Peak signal magnitude

The peak value of the input signal. This is also the peak value of the output signal.

Supported Data Type

PortSupported Data Types
  • double

  • double

Pair Block

A-Law Expander


[1] Sklar, Bernard. Digital Communications: Fundamentals and Applications. Englewood Cliffs, N.J., Prentice-Hall, 1988.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced before R2006a