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