Commit f89a1f51993f79c3e95314b649f93f41d2a58bf7

Authored by bmarechal
1 parent b25b94030b
Exists in master

change highpass frequency corner

Showing 1 changed file with 27 additions and 0 deletions Inline Diff

File was created 1 #!/usr/bin/octave-cli --persist
2
3 filename = argv(){1};
4 col = eval(argv(){2});
5 mult = eval(argv(){3});
6 data.fs = eval(argv(){4});
7
8 [b, a] = butter (3, data.fs/1000, "high");
9
10 if length(col) == length(mult)
11 figure
12 hold all
13 grid on
14 cc = 'bkcgmry';
15 for i = [1:length(col)]
16 data.x = filter(b, a, load(filename)(:,col(i)).*mult(i))(floor(end/4):end);
17 N = length(data.x);
18 f = (data.fs/N)*((-(N-1)/2):((N-1)/2));
19 X = abs(fftshift(ifft(data.x)));
20 plot(f, X, cc(mod(i, length(cc))))
21 leg{i} = strcat(filename, ' col', num2str(col(i)));
22 hold on
23 end
24 legend(leg)