Commit 3124193a363a72e19ea3829623ede01182db9c08

Authored by bmarechal
1 parent 6ce4bbcc4e
Exists in master

allanplot.m: add detrend option

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

... ... @@ -11,6 +11,10 @@
11 11 cc = 'bkcgmry';
12 12 for i = [1:length(col)]
13 13 data.freq = load(filename)(:,col(i)).*mult(i);
  14 + if eval(argv(){4})(i) == 1
  15 + printf(strcat(filename, ' col', num2str(col(i)), ' drift removed\n\n'))
  16 + data.freq = detrend(data.freq);
  17 + end
14 18 data.rate = 1;
15 19 [ad, S, err, tau] = allan(data, 2.^[0:nextpow2(length(data.freq))-3]./data.rate, strcat(strsplit(filename, '/'){end}, num2str(i)), 0);
16 20 loglogerr(tau, ad, err, strcat(cc(mod(i, length(cc))), '-s'))