--- a/filterbank/filterbankresponse.m
+++ b/filterbank/filterbankresponse.m
@@ -10,7 +10,7 @@
 %   a dip indicates that it is not well represented.
 %
 %   In mathematical terms, this function computes the diagonal of the
-%   Fourier transform of the frame operator.
+%   Fourier transform of the frame operator when the filterbank is painless.
 %
 %   `filterbankresponse(g,a,L,'real')` does the same for a filterbank
 %   intended for positive-only filterbank.
@@ -24,18 +24,20 @@
 
 % G1 is done this way just so that we can determine the data type.
 G1=comp_transferfunction(g{1},L);
-gf=abs(G1).^2;
+gf=abs(G1).^2*(L/a(1));
 
 M=numel(g);
   
 for m=2:M
-  gf=gf+abs(comp_transferfunction(g{m},L)).^2;
+  gf=gf+abs(comp_transferfunction(g{m},L)).^2*(L/a(m));
 end;
   
 if flags.do_real
   gf=gf+involute(gf);   
 end;
 
+gf=gf/L;
+
 if flags.do_plot
   plotfft(gf,'lin');
 end;