MATLAB: How to remove outliers from a Raman spectrum

outliersraman spectrumremove outliers

I have a Raman spectrum looking like the one below and would like to remove the outliers from it. I tried to remove it using e.g. a function "rmoutliers" but it does not seem to work. How to do it?
Thanks a lot for the answer.
RamanSpectrum_MatlabFQ.png

Best Answer

You can achieve this using the different methods.
1) Using Basic fitting:
  • Fit a curve using 'polyfit'.
  • Identify outliers that lie outside the tolerance values.
  • Replace the outliers with fitted values.
2) Curve Fitting Toolbox can also be used to remove outliers from your data,
3) You can also use the following MATLAB Central File Exchange submission,
Hope this helps!