Johann Klammer
2020-02-14 05:15:13 UTC
I have followed rick lyons article on this
<https://www.dsprelated.com/showarticle/42.php>
,and using the example values he gives, the output matches.
But using different parameters the filter kenel ends up strangely
wiggly. I must be doing something wrong.
what am I doing wrong?
<https://www.dsprelated.com/showarticle/42.php>
,and using the example values he gives, the output matches.
But using different parameters the filter kenel ends up strangely
wiggly. I must be doing something wrong.
N:32;
gamma:48/20;
M:N+1;
alpha:cosh(acosh(10^gamma)/N);
A(m):=abs(alpha*cos(%pi*m/N));
W(m):=((-1)^m)*chebyshev_t(N,A(m));
makelist(''ev(ratsimp(W(n)),numer),n,0,N-1);
then, I copy the vector over to octave(editing out the newlines).gamma:48/20;
M:N+1;
alpha:cosh(acosh(10^gamma)/N);
A(m):=abs(alpha*cos(%pi*m/N));
W(m):=((-1)^m)*chebyshev_t(N,A(m));
makelist(''ev(ratsimp(W(n)),numer),n,0,N-1);
freq= [251.1886431509343, - 105.9392735931824, 0.4193242363116815, - 0.6394550815653592, 0.01522099347604597, 0.3856457167948537, 0.5997410704897626, 0.7320135982679906, 0.8183989191419395, 0.8771985186325758, 0.9183630436608434, 0.9478210284728955, 0.9668451541730011, 1.000472238713574, 0.8156703834037801, 2.638631937232813, - 11.99999999999998, 2.638631937232824, 0.8156703834037801, 1.000472238713574, 0.966845154173002, 0.9478210284728955, 0.9183630436608434, 0.8771985186325758, 0.8183989191419395, 0.7320135982679906, 0.599741070489752, 0.3856457167948537, 0.01522099347604597, - 0.6394550815653592, 0.4193242363116815, - 105.9392735931824]
td=ifft(freq);
td=real(td);
N=32;
te=[td(1)/2,td(2:N),td(1)/2];
tf=te/max(te);
0.05060350341419111,0.09318854394997424,0.0891740552692859,0.180542307461633,0.194132939061669,0.306667930702
4942,0.334105377095744,0.4643736917713142,0.497180244238745,0.6369967107549066,0.6630579828897345,0.800695027
2395862,0.8068400400763767,0.9292125330996996,0.9046336599899251,1,0.9393020597770186,1,0.9046336599899251,0.
9292125330996994,0.8068400400763767,0.8006950272395861,0.6630579828897345,0.6369967107549066,0.49718024423874
5,0.4643736917713142,0.334105377095744,0.3066679307024942,0.194132939061669,0.180542307461633,0.0891740552692
859,0.09318854394997422,0.05060350341419111
plotting this shows wiggles, unsure why.td=ifft(freq);
td=real(td);
N=32;
te=[td(1)/2,td(2:N),td(1)/2];
tf=te/max(te);
0.05060350341419111,0.09318854394997424,0.0891740552692859,0.180542307461633,0.194132939061669,0.306667930702
4942,0.334105377095744,0.4643736917713142,0.497180244238745,0.6369967107549066,0.6630579828897345,0.800695027
2395862,0.8068400400763767,0.9292125330996996,0.9046336599899251,1,0.9393020597770186,1,0.9046336599899251,0.
9292125330996994,0.8068400400763767,0.8006950272395861,0.6630579828897345,0.6369967107549066,0.49718024423874
5,0.4643736917713142,0.334105377095744,0.3066679307024942,0.194132939061669,0.180542307461633,0.0891740552692
859,0.09318854394997422,0.05060350341419111
what am I doing wrong?