Commit 6ce4bbcc4e2472dc36abaad7b773b70899136c3f

Authored by bmarechal
1 parent 44538abe48
Exists in master

allanplot.m: autorange and view points

Showing 1 changed file with 2 additions and 1 deletions Inline Diff

#!/usr/bin/octave-cli --persist 1 1 #!/usr/bin/octave-cli --persist
2 2
filename = argv(){1}; 3 3 filename = argv(){1};
col = eval(argv(){2}); 4 4 col = eval(argv(){2});
mult = eval(argv(){3}); 5 5 mult = eval(argv(){3});
6 6
if length(col) == length(mult) 7 7 if length(col) == length(mult)
figure 8 8 figure
hold all 9 9 hold all
grid on 10 10 grid on
cc = 'bkcgmry'; 11 11 cc = 'bkcgmry';
for i = [1:length(col)] 12 12 for i = [1:length(col)]
data.freq = load(filename)(:,col(i)).*mult(i); 13 13 data.freq = load(filename)(:,col(i)).*mult(i);
data.rate = 1; 14 14 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); 15 15 [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, cc(mod(i, length(cc)))) 16 16 loglogerr(tau, ad, err, strcat(cc(mod(i, length(cc))), '-s'))
leg{i} = strcat(filename, ' col', num2str(col(i))); 17 17 leg{i} = strcat(filename, ' col', num2str(col(i)));
18 axis(10.^ceil(log10([tau(1), tau(end)])))
hold on 18 19 hold on
end 19 20 end
legend(leg) 20 21 legend(leg)
input("Press to continue..."); 21 22 input("Press to continue...");
end 22 23 end