Skip to content
Snippets Groups Projects
Commit b4d766e6 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Save cl.

parent 7e9e04f6
No related branches found
No related tags found
1 merge request!420Resolve RTSD-264
...@@ -30,6 +30,8 @@ Norder = Kcoefs - 1; ...@@ -30,6 +30,8 @@ Norder = Kcoefs - 1;
W0 = 1 / 15.3; W0 = 1 / 15.3;
%W0 = 1 / 15.19; %W0 = 1 / 15.19;
c = fircls1(Norder, W0, .02, .0003); c = fircls1(Norder, W0, .02, .0003);
dc_gain_c = sum(c)
% c = c / dc_gain_c; % force DC gain = 1
figure(1) figure(1)
subplot(3, 1, 1) subplot(3, 1, 1)
...@@ -79,8 +81,7 @@ Q = 12; ...@@ -79,8 +81,7 @@ Q = 12;
% Y = interpft(X, N) returns a vector Y of length N obtained by interpolation % Y = interpft(X, N) returns a vector Y of length N obtained by interpolation
% in the Fourier transform of X. % in the Fourier transform of X.
cl = interpft(c, length(c) * Q) / Q; cl = interpft(c, length(c) * Q) / Q;
dc_gain_c = sum(c); dc_gain_cl = sum(cl)
dc_gain_cl = sum(cl);
Ncoefs = Kcoefs * Q; Ncoefs = Kcoefs * Q;
Nfft = Kfft * Q; Nfft = Kfft * Q;
...@@ -98,3 +99,6 @@ xlabel('Frequency (FFT bins)','FontSize',10) ...@@ -98,3 +99,6 @@ xlabel('Frequency (FFT bins)','FontSize',10)
ylabel('Magnitude','FontSize',10) ylabel('Magnitude','FontSize',10)
title ('Response of fircls1 filter c and interpolated cl') title ('Response of fircls1 filter c and interpolated cl')
grid grid
clT = cl';
save('cl.txt', 'clT', '-ascii', '-double')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment