What would be the best approach for baseline correction?

댓글 수: 1

the cyclist
the cyclist 2019년 10월 2일
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.

댓글을 달려면 로그인하십시오.

 채택된 답변

the cyclist
the cyclist 2019년 9월 30일

0 개 추천

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

Usaid
Usaid 2019년 9월 30일
편집: Usaid 2019년 9월 30일
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');

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2019년 9월 30일

댓글:

2019년 10월 2일

Community Treasure Hunt

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

Start Hunting!

Translated by