[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: firls.m, part 2

From: je suis
Subject: Re: firls.m, part 2
Date: Fri, 9 Jun 2017 19:24:19 +0000

I have discovered the source of the errors: expint(). For purely
imaginary arguments, as their value increases, the results come more
and more worse. I have made a separate version, E1(x), which uses code
adapted from Numerical recipes and, not least, when run with this

x=(1:0.1:100)*1i; tic; a=E1(x); toc, tic; b=expint(x); toc

the timings are almost the same: 0.76s (E1) and 0.72 (expint). This
for eps=1e-15.

I gave uploaded E1.m in the same location on github and, after some
more testing with the 3 examples I have with 1/f^2 weighting [mostly
plotting diff(abs(fft(h)))) ],  I dare conclude that my numbers are
better than Matlab's.

Please check the two scripts for whatever input you can think of. When
using 1/f^2 weighting, don't forget that there will be similar
numbers, with larger differences towards the ends of the impulse, and
with a dew common decimals towards the middle, but I dare you to plot
the derivative of the FFT for both: you can clearly see the
exponential rise in the ripple and the (almost) zero ripple close to
DC, in my results. I'm sorry, I can only stay modest for so long. :-)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]