Best Approach for baseline correction?

What would be the best approach for baseline correction?

1 commentaire

the cyclist
the cyclist le 2 Oct 2019
I think it would be better for you to open up a new question, and try to be as descriptive as you can about what you are trying to do.
That will be better than what you did here, which was to radically change your question such that the accepted answer makes no sense now.

Connectez-vous pour commenter.

 Réponse acceptée

the cyclist
the cyclist le 30 Sep 2019
If x is your variable, then
x(x<0) = 0;
will change all the negative values to zero.
If that does not do what you want, you'll need to be more specific about what you mean by "shift to be above zero".

1 commentaire

Usaid
Usaid le 30 Sep 2019
Modifié(e) : Usaid le 30 Sep 2019
No, that's not what I'm looking for. What I need is after is the baseline correction for the peaks between 1100 ~ 1800 not to be below zero. This is how I did the baseline.
baseY= sgolayfilt(v, 3, 35); %smoothing data
dY = v - baseY;
filter_size2 = 5; %filter size
b = (1/filter_size2)*ones(1,filter_size2);
a = 1;
y = filtfilt(b,a,dY);
plot(x, dY,'r','linewidth',2)
set (gca,'xdir', 'reverse');

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by