aboutsummaryrefslogtreecommitdiffstats
path: root/lab5/RTDSP/Matlab/gen_filter.m
blob: 2709e48e8ec86d0aa6e9bf52617d186346c13f0b (plain)
1
2
3
4
5
6
7
8
9
10
11
Fs = 8000;
[b,a] = elliptical (4, 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);