bugGNU Octave - Bugs: bug #51657, [octave-forge] (signal) gausswin...

 
 

bug #51657: [octave-forge] (signal) gausswin produces slightly wrong result

Submitted by:  None
Submitted on:  Fri 04 Aug 2017 11:55:32 AM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: In ProgressAssigned to: Juan Pablo Carbajal <juanpi>
Originator Name: Håkon A. HjortlandOriginator Email: -unavailable-
Open/Closed: OpenRelease: 4.0.0
Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Mon 11 Dec 2017 09:26:26 PM UTC, comment #6:

The "current" development version refers to revision ae7ace06b8c6

Juan Pablo Carbajal <juanpi>
Project MemberIn charge of this item.
Mon 11 Dec 2017 09:25:44 PM UTC, comment #5:

Hi,

To speed up the process you can send patches against the current development version of signal.

I implemented a fix for the matlab 2017a incompatibility for scalar input. If their text help says m should be a scalar, their function has a bug!

With the development version you get

I am not sure we want to copy the behavior for the non-scalar input. My guess is that this is an undesired behavior that they got when introducing automatic broadcasting. They will probably fix it in the future.

Juan Pablo Carbajal <juanpi>
Project MemberIn charge of this item.
Mon 11 Dec 2017 12:56:30 PM UTC, comment #4:

Any updates on this?

Is the proposed fix for signal 1.3.2 of changing a/m to a/(m-1) in the specified line of gausswin.m the correct one (assuming normal window sizes)?

Is there anything I can do to help?

Kenneth Hoste <kehoste>
Fri 11 Aug 2017 08:27:18 PM UTC, comment #3:

Ok, the last one is just weird. Matlab documentation mentions that N (M in the octave version) must be a positive integer. So the warning and rounding is not unexpected. but the fact that it accepts an array is odd, and odd results come about:

best as I can guess from the formula on the help page is that there's a matrix multiplication or division that is allowed to occur

I don't think that is at all intended. and it's not documented. So I'm going to ignore it and leave it as an error in octave for now unless matlab documentation changes.

Nicholas Jankowski <nrjank>
Fri 11 Aug 2017 06:41:52 PM UTC, comment #2:

checking the current tests in octave's gausswin, the following expect to produce errors, but don't in Matlab:

will include these in updated sets of tests

Nicholas Jankowski <nrjank>
Fri 11 Aug 2017 06:35:56 PM UTC, comment #1:

additionally:

matlab 2017a:

Octave 4.2.1, signal 1.3.2, without your suggested change

Octave 4.2.1, signal 1.3.2, after making your suggested change to gausswin:

so there would be a few other compatibility wrinkles to work out. I'll try to generate some tests that a patch can be worked against.

Nicholas Jankowski <nrjank>
Fri 04 Aug 2017 11:55:32 AM UTC, original submission:

This is less pronounced for normal window lengths, though.

Looking at the algorithms section at
https://www.mathworks.com/help/signal/ref/gausswin.html
it seems that in signal-1.3.2/gausswin.m in the line
the expression a/m should be changed to a/(m-1).

Anonymous

 

(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 juanpi (Posted a comment)
  • -unavailable- added by kehoste (Posted a comment)
  • -unavailable- added by mtmiller (Updated the item)
  • -unavailable- added by nrjank (Posted a comment)
  • -unavailable- added by nrjank (pkg maintainer)
  • -unavailable- added by None (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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 11 Dec 2017 09:25:44 PM UTCjuanpiItem GroupInaccurate Result=>Matlab Compatibility
      StatusConfirmed=>In Progress
      Assigned toNone=>juanpi
    Fri 11 Aug 2017 08:29:08 PM UTCmtmillerStatusNone=>Confirmed
      Summarygausswin produces slightly wrong result=>[octave-forge] (signal) gausswin produces slightly wrong result
    Fri 11 Aug 2017 06:35:56 PM UTCnrjankCarbon-Copy-=>Added mtmiller

    Back to the top


    Powered by Savane 3.1-cleanup1