필터 지우기
필터 지우기

Indexing at the end of flat peaks

조회 수: 3 (최근 30일)
LukeJes
LukeJes 2020년 9월 2일
댓글: Luke Cohen 2021년 3월 25일
I have been using findpeaks to index my data, however, it is indexing the value at the start of each of the flat peaks. Instead, I want it to index the value at the end of the flat peaks so that I can cut up the data like I have done in my current code below:
[pksr, idcsr] = findpeaks(r_grf, 'MinPeakHeight',-100, 'MinPeakDist',100);
for k1 = 1:numel(idcsr)-1
grfcutr{k1} = r_grf(idcsr(k1)-10:idcsr(k1+1)-10);
end
I have looked at the documentation on flat peaks but it isn't helping in my case.
Image of my uncut data:
Thanks
  댓글 수: 2
Image Analyst
Image Analyst 2020년 9월 2일
Is the value at the flat section always exactly 0, or (if not) do you want to consider values within a specified distance of 0 to be part of the "flat" section? Do you have the Image Processing Toolbox - if so, this has functions which would make it almost trivial. Please attach your data - make it easy for us to help you, not hard (by making us create data somehow).
save('answers.mat', 'r_grf');
Then attach 'answers.mat'.
Luke Cohen
Luke Cohen 2021년 3월 25일
Hi Image Analyst,
I am trying to do something similar to this... can you mention the function in the Image Processing Toolbox that would be useful?

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

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by