Bugs in FindPhaseCoeff.m
Opened this issue · 0 comments
OccassionalBioinformatician commented
In FindPhaseCoeff.m
:
...
pk = findpeaks(phase_interval,2*pi*(0.9));
K = zeros(numel(timesample),1);
for k = 1:numel(pk.loc)
K = K+(timesample-pk.loc(k)>0)';
end
...
- The second argument in
findpeaks
takes the sampling rate. What's2*pi*(0.9)
doing here? pk
is NOT a structure to have anyloc
attribute but a vector! So, rewrite as:
[~, loc] = findpeaks(phase_interval);
K = zeros(numel(timesample),1);
for k = 1:numel(loc)
K = K + (timesample - loc(k) > 0)';
end