How to remove outliers from a Raman spectrum

10 次查看(过去 30 天)
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
  1 个评论
Gaska
Gaska 2020-1-2
For example, by using the function: rmoutliers I get this (blue: my spectrum; red: spectrum after rmoutliers function)
The code is:
X=lambda;
Y=intensity;
[B,TF] = rmoutliers(Y,'movmedian',X(200),'SamplePoints',X);
figure;
plot(X,Y,'b-',lambda(~TF),B,'r-');
legend('Input Data','Output Data');
RamanSpectrum_MatlabFQ_1.png

请先登录,再进行评论。

采纳的回答

Divya Gaddipati
Divya Gaddipati 2020-1-8
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!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Parametric Spectral Estimation 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by