bugGNU Octave - Bugs: bug #51145, convn: incompatible results on...

 
 

bug #51145: convn: incompatible results on empty inputs

Submitted by:  Hartmut <hardy>
Submitted on:  Tue 30 May 2017 06:12:29 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 3 - LowItem Group: WTF, Matlab?!?
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: 4.2.1Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Jun 2017 12:56:23 AM UTC, comment #5:

Okay, thanks for testing. This is just weird, but I am marking it as confirmed. I'm lowering the priority since I don't see this as critical.

Rik <rik5>
Project Administrator
Wed 31 May 2017 11:29:05 PM UTC, comment #4:

MATLAB 2016a

I would also like to take this opportunity to plug a feature request for "cyclic" / "circular" convolution :)

Ceral Paquet <octavebugs>
Wed 31 May 2017 07:51:28 PM UTC, comment #3:

Sorry, I do not have access to a newer Matlab version.

I am also unsure if this is worth fixing, or at least changing, at all. Having either empty data or an empty filter with conv doesn't make much sense to me. This issue is really only about "compatibility" in this case.

Maybe a user's intuitive understanding might be: If I have an empty filter, then I expect to get my unchanged data back, since I am not filtering at all in this case. But his isn't quite what Matlab (R2014b) does, either.

Hartmut <hardy>
Wed 31 May 2017 06:18:02 PM UTC, comment #2:

Is it possible to test the Matlab behavior in a newer version, R2016b or R2017a? I wonder if they have fixed this.

Rik <rik5>
Project Administrator
Wed 31 May 2017 12:39:57 AM UTC, comment #1:

I think this is a Matlab bug. Even if the output ought to be of size "size(A)+size(B)-1" then it should return something of size [4 4], and not [5 5]. We can have Octave return that [4 4] by simply removing those checks on oct-conv.cc http://hg.savannah.gnu.org/hgweb/octave/file/0e4ceda8fbcf/liboctave/numeric/oct-convn.cc#l135

But I am still unsure. If the point of full convolution is to include even elements affected by padding, since there was no convolution done at all, the return should be empty?

I am removing the filter2 part of the bug title, since that behaviour is inherited from the conv functions.

Carnë Draug <carandraug>
Project Member
Tue 30 May 2017 06:12:29 PM UTC, original submission:

This happens in Octave 4.2.1:

This is the corresponding Matlab (R2014b) output:

So the Octave version of the functions conv2 and filter2 always return an empty matrix if any input value is an empty matrix. But the Matlab version returns mostly (except for one of four cases, funny) a full zero matrix in this case.

Hartmut <hardy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by octavebugs (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by hardy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Jun 2017 12:56:23 AM UTCrik5Priority5 - Normal=>3 - Low
      Item GroupMatlab Compatibility=>WTF, Matlab?!?
      StatusNeed Info=>Confirmed
    Wed 31 May 2017 06:18:02 PM UTCrik5StatusNone=>Need Info
    Wed 31 May 2017 12:39:57 AM UTCcarandraugSummaryconv2 and filter2: incompatible results on empty inputs=>convn: incompatible results on empty inputs

    Back to the top


    Powered by Savane 3.1-cleanup1