From 3124193a363a72e19ea3829623ede01182db9c08 Mon Sep 17 00:00:00 2001 From: bma Date: Tue, 31 Oct 2017 14:03:34 +0100 Subject: [PATCH] allanplot.m: add detrend option --- allanplot.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/allanplot.m b/allanplot.m index 4c9e42d..909a9a7 100755 --- a/allanplot.m +++ b/allanplot.m @@ -11,6 +11,10 @@ if length(col) == length(mult) cc = 'bkcgmry'; for i = [1:length(col)] data.freq = load(filename)(:,col(i)).*mult(i); + if eval(argv(){4})(i) == 1 + printf(strcat(filename, ' col', num2str(col(i)), ' drift removed\n\n')) + data.freq = detrend(data.freq); + end data.rate = 1; [ad, S, err, tau] = allan(data, 2.^[0:nextpow2(length(data.freq))-3]./data.rate, strcat(strsplit(filename, '/'){end}, num2str(i)), 0); loglogerr(tau, ad, err, strcat(cc(mod(i, length(cc))), '-s')) -- 2.16.4