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!