How to remove outliers from a Raman spectrum

3 Ansichten (letzte 30 Tage)
Gaska
Gaska am 2 Jan. 2020
Kommentiert: Gaska am 10 Jan. 2020
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 Kommentar
Gaska
Gaska am 2 Jan. 2020
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

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Divya Gaddipati
Divya Gaddipati am 8 Jan. 2020
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!

Weitere Antworten (0)

Kategorien

Mehr zu Linear and Nonlinear Regression finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by