[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: About the derivation in firls.m

**From**: |
je suis |

**Subject**: |
Re: About the derivation in firls.m |

**Date**: |
Mon, 8 May 2017 18:07:09 +0000 |

I just realized I made some changes while testing and I forgot to
include them. This is how it looks like in the cos_ints2 part:
if oddN
cos_ints = sin((0.5:1:M+1)'*w);
cos_ints2 = [cos((0.5:1:M+1)' * w(i2)) - cos((0.5:1:M+1)' * w(i1))] ./
...
([0.5:1:M+1]' * (w(i2) - w(i1)));
else
cos_ints = [w; sin((1:M)' * w)];
cos_ints2 = [w(i1).^2 - w(i2).^2;
cos((1:M)' * w(i2)) - cos((1:M)' * w(i1))] ./ ...
([2,1:M]' * (w(i2) - w(i1)));
end