Find all the peaks higher than this threshold and save the corresponding range in a variable.
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Sara Nasir
el 22 de Mzo. de 2022
Comentada: Star Strider
el 23 de Mzo. de 2022
I have two plots on the same graph. The blue one is the MaxPerRangeBin and the red one is CfarThold.
I want to locate the peaks in blue which are higher than the red plot.
I have used islocalmax to locate all the peaks in MaxPerRangeBin , which is the logic I have to apply. Now, I have to just find out all the peaks which are just greater than red plot i.e. CfarThold.
I am sharing the snippet, along with the graph.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/937604/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/937604/image.jpeg)
TF = islocalmax(data(i).MaxPerRangeBin,2);
aa(num_values,:) = data(i).MaxPerRangeBin(num_values,:);
peakvalue_MPRB = aa(TF(num_values,:));
3 comentarios
Image Analyst
el 23 de Mzo. de 2022
Again, can you attach the data? You forgot to attach any .mat files with the paperclip icon.
Respuesta aceptada
Star Strider
el 23 de Mzo. de 2022
Possibly:
idxv = 1:numel(data(i).MaxPerRangeBin(1,:)); % Index Vector
Lv = (data(i).MaxPerRangeBin(1,:)) >= (data(i).CfarThold(1,:)); % Logical Vector
TF = islocalmax(data(i).MaxPerRangeBin(1,Lv)); % Peaks Logical Vector
TFidx = find(TF); % Numeric Indices
PeakIndices{i} = TFidx; % Save Peak Index Values
.
4 comentarios
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!