aboutsummaryrefslogtreecommitdiffstats
path: root/lab5/RTDSP/Matlab/gen_filter.m
blob: 6822bfe56eaaafc9d5d8f41a1a509370ca44a2fe (plain)
1
2
3
4
5
6
7
8
9
10
11
Fs = 8000;
[b,a] = elliptical (Fs);
freqz(b, a);

fileID = fopen('coeff.txt','w');
fprintf(fileID, 'double a[] = {');
fprintf(fileID, '%.15e, ', a);
fprintf(fileID, '};\ndouble b[] = {');
fprintf(fileID, '%.15e, ', b);
fprintf(fileID, '};\n');
fclose(fileID);