<commit_before>t = [0: 0.0000625: 0.02];
N = size(t, '*');
sin_100Hz = 2*sin(2*%pi*700*t);
sin_1000Hz = 2*sin(2*%pi*1000*t);
sin_5000Hz = 2*sin(2*%pi*5000*t);
testsign = sin_100Hz + sin_1000Hz + sin_5000Hz;
[LD_coeff, amplitude, frequentie] = wfir('bp',100,[2050/16000, 0.5],'hm',[0 0]);
LD_polynoom = poly(LD_coeff, 'z', 'coeff');
LD_functie = horner(LD_polynoom, 1/%z);
LD_lineair_system = syslin('d', LD_functie);
LD_output = flts(testsign, LD_lineair_system);

Frequentie_FFT = abs(fft(testsign));
f = 16000 * (0:(N/2))/N;
n = size(f, '*');
figure;

subplot(311);
plot(f, Frequentie_FFT(1:n));
plot(frequentie*16000, amplitude*N, 'black');
subplot(312);
plot(t, LD_output, 'r');
subplot(313);
plot(t, testsign)
plot(t, LD_output, 'r');
plot(t, sin_5000Hz, 'g');<commit_msg>read en write Wav toegevoegd<commit_after>[testsign,Fs,bits]=wavread("SCI/modules/sound/demos/filterTest2(anja).wav");
//[testsign,Fs,bits]=wavread("SCI/modules/sound/demos/filterTest1(H-style).wav");

testsign = testsign(1,:);
t = [1:1:length(testsign)]*1/Fs;

[LD_coeff, amplitude, frequentie] = wfir('bp',100,[2050/16000, 0.5],'hm',[0 0]);
LD_polynoom = poly(LD_coeff, 'z', 'coeff');
LD_functie = horner(LD_polynoom, 1/%z);
LD_lineair_system = syslin('d', LD_functie);
LD_output = flts(testsign, LD_lineair_system);

plot(t, testsign)
plot(t, LD_output, 'r');

wavwrite(LD_output, 'SCI/modules/sound/demos/'+'yolo.wav');
{'fraction_non_alphanumeric': 0.22, 'fraction_numerical': 0.08357142857142857, 'mean_word_length': 7.867088607594937, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6727106', 'n_tokens_mistral': 736, 'n_tokens_neox': 644, 'n_words': 97}