Thank you. I've run some simple tests:
b1=fir1(255,0.55);
b2=fir1(270,0.65,'high');
b3=fir1(370,[0.2 0.8]);
b4=fir1(220,[0.1 0.25 0.45 0.7 0.8],'DC-0');
b4=fir1(153,[0.15 0.35 0.55 0.75 0.85],'DC-1');
comparing Octave's results of the fir1 function (1.1.1 with and without the
patch) and Matlab's results. It turns out that there are more differences
in fir1 between Octave (signal-1.1.1) and Matlab (6.5) than those related
to the bug that the patch is fixing: column vector of coefficients vs. row
vector, differences in coefficient values (around 1e-3 maximum). I'll try
to find out why.
However, it still seems that the patch is correct.
Alberto
2011/11/10 Carnë Draug <carandraug+...@gmail.com>
> 2011/11/8 Carnė Draug <carandraug+...@gmail.com>:
> > On 8 November 2011 13:11, Alberto Cuadrado <a.cuadr...@gmail.com> wrote:
> >> Hello Jeff,
> >>
> >> thank you for answering. And Carnė, thank you too.
> >>
> >> I don't realize what's the problem with the number of coefficients at
> the
> >> moment. Please, let me think about it.
> >>
> >> However, you are right about that sentence about Matlab's normalization.
> >> Matlab's help on fir1 says so. But in fact that's not the actual
> behaviour
> >> of the function if you look at the code (or maybe it is, if you
> consider the
> >> periodic nature of the discrete filter frequency response when looking
> for
> >> the center frequencies of the bands). Anyway, attached is a patch with
> the
> >> actual behavior (if I'm not wrong; it still needs thoroughly testing).
> It's
> >> all briefly explained in the comments.
> >
> > If no one has a comment about this, I'll apply the patch in 3 days.
>
> I have made the commit of the patch. Thank you for fixing this.
>
> Carnė
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Octave-dev mailing list
Octave-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/octave-dev