octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #34893] Unexpected and inconsistent conv/conv2


From: Nitzan Arazi
Subject: [Octave-bug-tracker] [bug #34893] Unexpected and inconsistent conv/conv2 results
Date: Thu, 24 Nov 2011 21:11:39 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.121 Safari/535.2

URL:
  <http://savannah.gnu.org/bugs/?34893>

                 Summary: Unexpected and inconsistent conv/conv2 results
                 Project: GNU Octave
            Submitted by: nitnit
            Submitted on: Thu 24 Nov 2011 09:11:38 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Nitzan Arazi
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.4.3
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

I have encountered the following erroneous cases with conv and conv2 with
Mingw builds versions 3.4.2 and 3.4.3.

Case A:

conv([1:5].',[1:2].','valid')

ans =

    1
    4
    7
   10
   13
   10

while the expected output is:

ans =
    4
    7
   10
   13

Similarily

conv([1:5],[1:2],'valid')

ans =

    1    4    7   10   13   10

while the expected output is:

ans =

    4    7   10   13

Case B:

conv2([1:5;1:5],[1:2],'valid')

ans =

    5    8   11   14
    5    8   11   14

while the expected output is:

ans =

    4    7   10   13
    4    7   10   13

conv2([1:5;1:5].',[1:2].','valid')
output is OK.

Case C:

conv2([1:5;1:5].',[1:2].','same') % second input var has even number of
elements

ans =

    1    1
    4    4
    7    7
   10   10
   13   13

while the expected output (as output by m****b) is

ans =

    4    4
    7    7
   10   10
   13   13
   10   10

Similarily


conv2([1:5;1:5],[1:2],'same')

ans =

    1    4    7   10   13
    1    4    7   10   13

while the expected output is:

ans =

    4    7   10   13   10
    4    7   10   13   10

If second input var has odd number of elements, output is OK.

Note: m****b docs defines indices of the second input var as
as floor(([mb nb]+1)/2)
where mb nb are the col and row dimensions of the second input var.
 




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?34893>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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