File Exchange

image thumbnail

Background correction

version (4.92 KB) by Vincent Mazet
Compute an estimation of the background (aka baseline) in chemical spectra.


Updated 20 Feb 2013

View License

This program estimates the background (or baseline) of optical spectra by the polynomial minimizing a cost function. If the cost function was quadratic, the solution is the least squares estimation, which is not appropriate in this problem. Instead, we need to use of non-quadratic cost function such as the symmetrical Huber function, the symmetrical truncated quadratic or their respective asymmetrical shape.

The program backcor is the new version of the former backest (released in 2008). The main difference is the availability of a graphical user interface (of course, it can be not used).

The program is written in Matlab and should work with Matlab 6 (or higher). The ZIP file to download contains two Matlab script:
* a demonstration script (demo);
* the main function (backcor) which can be run with or without a graphical user interface.

Type help backcor in Matlab to get the syntax of the function.

Cite As

Vincent Mazet (2020). Background correction (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (11)

Betty Bai

Siyuan Hou

David Kim




I'm trying to use this scrip for my signal. But I can not do it because I don't know what I should put for 'n' (wavelength) in input argument.
Any help will be appreciated



Very useful. Thanks!


thanks for this.


Update the link to my webpage.

Add a comment in the help.

Fix bug concerning the sorting of data.

Add a link to my webpage.

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