bug in conv()

Ben Abbott bpabbott at mac.com
Sun Sep 28 19:59:12 CDT 2008


On Sep 28, 2008, at 4:47 PM, dph.work wrote:

> According to http://www.gnu.org/software/octave/FAQ.html#MATLAB-compatibility
> differences in Matlab and Octave are considered bugs.  The attached  
> m file
> illustrates how conv() produces a column vector in Matlab and a row  
> vector in
> Octave.
>
> Hope this helps.
> Dan
>
> % In Matlab the variable c ends up a column vector, while in Octave it
> % ends up a row vector.
> %
> % octave:9> conv_bug.m
> % ans =
> %
> %    1   29
> %octave:9> ver
> %
> %  
> ----------------------------------------------------------------------
> % GNU Octave Version 3.0.1
> % GNU Octave License: GNU General Public License
> % Operating System: Linux 2.6.18-4-amd64 #1 SMP Mon Mar 26 11:36:53
> % CEST 2007 x86_64
> %  
> ----------------------------------------------------------------------
>
> % matlab>> conv_bug
> %
> % ans =
> %
> %    29     1
> %
> %matlab>> ver
> %  
> -----------------------------------------------------------------------
> % MATLAB Version 7.3.0.298 (R2006b)
> % MATLAB License Number:
> % Operating System: Linux 2.6.18-4-amd64 #1 SMP Mon Mar 26 11:36:53
> % CEST 2007 x86_64
> % Java VM Version: Java is not enabled
> %  
> -----------------------------------------------------------------------
> % MATLAB                                     Version 7.3         
> (R2006b)
> % Signal Processing Toolbox                  Version 6.6         
> (R2006b)
>
> a = blackman(10);
> b = blackman(20);
> c = conv(a,b);
>
> size(c)

The default branch (3.1.51+) respects Matlab's behavior. However,  
3.0.2 fails.

Question for the list; As 3.0.3 is soon to be released, should that be  
fixed?

Ben




More information about the Bug-octave mailing list