how to find the sample space of two or more peaks within a power delay profile
조회 수: 6 (최근 30일)
이전 댓글 표시
giancarlo maldonado cardenas
2021년 10월 8일
편집: giancarlo maldonado cardenas
2022년 7월 13일
I have a signal of 1536 samples, as you can see in the image, I have a first ray of power that exceeds the threshold, if we count there are 4 samples until the next ray that exceeds the threshold, I wanted to know if it is possible to program a script that Say there is a ray of power exceeding the threshold, we are going to find if in the next 5 samples there is another ray exceeding the threshold. now if for example in sample 1000 I have another ray exceeding the threshold, the algorithm would have to search in the next 5 samples if there is another ray exceeding the threshold. Thank you so much
댓글 수: 4
Mathieu NOE
2021년 10월 12일
ok
I'm up for the task , if you have some data file Ican play with
still It's not 100% clear for me which peaks you want to extract. I have more or less understood that maybe that was a 5th ray after the first one (#8 in your plot) that you wanted to identify - or find if tere is one in the five samples after #8
canyou please clarify ?
채택된 답변
Mathieu NOE
2021년 10월 13일
hello again
this would be my suggestion to pic the two highest peaks inside each data bins , which are distant at least by 4 samples
the selected data appears are red diamonds in the 5th plot
threshold = 0.108599522476302;
% sort bins in ascending order
bins = sort(bins);
% search inside a buffer between two bins values
for ci = 1: numel(bins)-1
%select data inside bin
ind = (ceil(max(bins(ci),1)):floor(bins(ci+1)));
data = pdp(ind);
figure(ci)
hold on
stem(ind,data,'k','filled');
yline(threshold,'-.r','threshold','LineWidth',1);
xline(bins(ci),'--k');
xline(bins(ci+1),'--k');
% search for values above threshold
ind_val_ab_th = find(data>threshold);
if ~isempty(ind_val_ab_th)
val_ab_th = data(ind_val_ab_th);
% sort and pick 2 highest peaks
[val_ab_th,b] = sort(val_ab_th,'descend');
ind_val_ab_th = ind_val_ab_th(b);
ind_val_ab_th = ind_val_ab_th(1:2);
val_ab_th = val_ab_th(1:2);
% check x distance between the two selected points
x_dist = abs(ind_val_ab_th(1) - ind_val_ab_th(2));
if x_dist>4
plot(ind(ind_val_ab_th),val_ab_th,'dr');
end
end
end
댓글 수: 13
Mathieu NOE
2021년 11월 2일
Hi Giancarlo
I'm gald I could be of some help here
You can always contact me via my author's page on this forum
have a good day !
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Detection, Range and Doppler Estimation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!