Commit 50a9b705d5ad8982b738b973dc6a1a5f4b76f9d2

Authored by bmarechal
1 parent b3b851a23e
Exists in master

add abs()

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -328,7 +328,7 @@
328 328 fd2=diff(fa2);
329 329 % calculate two-sample variance for this tau
330 330 M=length(fa);
331   - sm(k)=sqrt(0.5/(M-1)*(sum(fd.*fd2)));
  331 + sm(k)=sqrt(0.5/(M-1)*(abs(sum(fd.*fd2))));
332 332  
333 333 % estimate error bars
334 334 sme(k)=sm(k)/sqrt(M+1);