File Exchange

image thumbnail

A-weighting Filter with Matlab

version (2 KB) by Hristo Zhivomirov
A-weighting of a signal via spectral processing in the frequency domain.


Updated 17 Dec 2018

View License

The present code is a Matlab function that provides an A-weighting of a given signal via spectral processing.

An example is given in order to clarify the usage of the function. For convenience, the input and output arguments are given in the beginning of the function.

The code is based on the theory described in:

[1] Design Response of Weighting Networks for Acoustical Measurements ANSI S1.42-2001. Washington, American National Standards Institute, 2001.

[2] Electroacoustics Sound Level Meters Part 1: Specifications IEC 61672-1:2002. Geneva, International Electrotechnical Commission, 2002.

Cite As

Hristo Zhivomirov (2019). A-weighting Filter with Matlab (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

Hi Jonas! Thank you for your comment! Everything is alright with the function now! You may test and share your opinion about it!

Best regards,

Hi. I think this implementation is wrong. When plotting 20*log10(A) over frequency, this does not at all match the blue curve in
I think you are off by a square, i.e., a factor 2 in logarithmic domain. If you'd take the square root of the weighting curve before multiplying with the signal spectrum, you'd be more or less correct.

Very helpful! Thank you!


Does anyone help me related with dbA filter please?

Hi Steve! I can't resolve the problem at this stage, since I haven't enough information. Please, send me the figure, it will be a good starting point.


I made a comparison of the resulting spectrum using this time domain filter and the resulting spectrum using a direct implementation of the frequency domain definition of A-weighting as per the ANSI Standard S1.42-2001. Agreement was less than satisfactory.

My sampling rate was 25.6 kHz. Maybe this is too low. Let me know if you have any suggestions. I can send a figure showing the comparison if you'd like.


Change of the title of the submission.

A new version of the code has been uploaded.

A new version of the code has been uploaded.

A new version of the code has been uploaded.

Typos correction has been made.

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.

Learn About Live Editor