More focus on Database analysis and direct DSP'ing of run_id's
This commit is contained in:
@@ -689,10 +689,17 @@ classdef Signal
|
||||
|
||||
%estimate start pos of signal
|
||||
maxpeaknum = floor(length(a)/length(b));
|
||||
[pks,pkpos,w,p] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
|
||||
try
|
||||
[pks,pkpos,w,p] = findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend');
|
||||
catch
|
||||
warning(['Error in findpeaks, ususally the seuqnece is too short. Max peak num: ', num2str(maxpeaknum)]);
|
||||
return
|
||||
end
|
||||
|
||||
if mean(w) > 10 || mean(p) > 10
|
||||
return
|
||||
else
|
||||
sequenceFound = 1;
|
||||
end
|
||||
|
||||
if options.debug_plots
|
||||
@@ -700,6 +707,8 @@ classdef Signal
|
||||
findpeaks(abs(co./max(co)),'MinPeakDistance',length(b)/2,'MinPeakHeight',0.2,'NPeaks',maxpeaknum,'SortStr','descend')
|
||||
end
|
||||
|
||||
|
||||
|
||||
shifts = lags(pkpos);
|
||||
|
||||
shifts = shifts(shifts>=0);
|
||||
@@ -752,6 +761,12 @@ classdef Signal
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
%%
|
||||
function obj = filter(obj,a,b)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user