Indexing at the end of flat peaks
2 ビュー (過去 30 日間)
古いコメントを表示
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
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
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 件)
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!