more from home

This commit is contained in:
silas (home)
2025-03-10 11:49:59 +01:00
parent bc86fa8d98
commit ea8a43b2ae
6 changed files with 83 additions and 26 deletions

View File

@@ -698,18 +698,19 @@ classdef Signal
if numel(shifts) > 0
%Cut occurences of ref signal from signal (only positive shifts)
if all(sign(co(pkpos)))
isFlipped = 1;
end
for c = shifts(shifts>=0)
sig = obj.delay(-c,'mode','samples');
sig.signal = sig.signal(1:length(b));
sig.signal = sig.signal(1:length(b)).*-isFlipped;
S{end+1,1} = sig;
end
%
if all(sign(co(pkpos)))
isFlipped = 1;
end
%return/keep the sinal with the highest correlation (only within positive shifts)
[~,idx]=max(pks(shifts>=0));