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 Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  Juan Pablo Carbajal <juanpi>
Originator Name:  Håkon A. Hjortland Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  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)

Wed 21 Mar 2018 08:42:56 AM UTC, comment #7:

I made some style fixes and added some more test cases based on this bug report.


Can we close this as fixed? I think the function is behaving correctly now and should not accept m as a vector.

Mike Miller <mtmiller>
Project Administrator
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:


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:


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
it seems that in signal-1.3.2/gausswin.m in the line
the expression a/m should be changed to a/(m-1).



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

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by kehoste (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by nrjank (pkg maintainer)
  • -email is unavailable- added by None (Submitted the item)

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

    Only project members can vote.




    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-02 jwe Summary[octave-forge] (signal) gausswin produces slightly wrong result => [octave forge] (signal) gausswin produces slightly wrong result
    2018-04-02 mtmiller StatusIn Progress => Fixed
        Open/ClosedOpen => Closed
    2017-12-11 juanpi Item GroupInaccurate Result => Matlab Compatibility
        StatusConfirmed => In Progress
        Assigned toNone => juanpi
    2017-08-11 mtmiller StatusNone => Confirmed
        Summarygausswin produces slightly wrong result => [octave-forge] (signal) gausswin produces slightly wrong result
    2017-08-11 nrjank Carbon-Copy- => Added mtmiller

    Back to the top

    Powered by Savane 3.4