more from home
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user