bugGNU Octave - Bugs: bug #60116, [octave forge] (signal) Off-by-one...


bug #60116: [octave forge] (signal) Off-by-one error in output of specgram for certain parameter combinations

Submitted by:  None
Submitted on:  Thu 25 Feb 2021 04:36:54 PM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  dev
Operating System:  Any

Add a New Comment (Rich Markup)

You are not logged in

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


Tue 09 Mar 2021 10:55:21 PM UTC, comment #3: 

The best way to help solve this would be to provide a patch with the fix, with author attribution, and if possible include a test case that exercises the fix.

Mike Miller <mtmiller>
Project Administrator
Mon 01 Mar 2021 06:29:01 PM UTC, comment #2: 

Thanks, I have emailed him with a link to this issue.

Mon 01 Mar 2021 05:49:42 PM UTC, comment #1: 

The fix looks correct.  The issue will need to be taken up by the maintainer of the signal package.  You might try e-mailing the maintainer directly and referencing this bug report.

Rik <rik5>
Project Administrator
Thu 25 Feb 2021 04:36:54 PM UTC, original submission:  

The specgram function contains this line:

offset = [ 1 : step : length(x)-win_size ];

The formula I expect would be:

offset = [ 1 : step : length(x)-win_size+1 ];

Take for example length(x) = 3, win_size = 1, step = 1. You would expect offset = [ 1, 2, 3 ] but above formula returns [ 1, 2 ]. The number of frames in the output is off-by-one iff length(x)-win_size is a multiple of step.



(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 mmuetzel (Updated 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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-03-01 rik5 Carbon-CopyRemoved 72865 => -
    2021-03-01 rik5 CategoryOctave Function => Octave Forge Package
    2021-03-01 mmuetzel SummaryOff-by-one error in output of specgram for certain parameter combinations => [octave forge] (signal) Off-by-one error in output of specgram for certain parameter combinations

    Back to the top

    Powered by Savane 3.6