bugGNU Octave - Bugs: bug #53094, findpeaks fails to find peaks in...

 
 

bug #53094: findpeaks fails to find peaks in some cases

Submitter:  None
Submitted:  Thu 08 Feb 2018 12:13:09 PM UTC
   
 
Category:  Octave Package Severity:  2 - Minor
Priority:  3 - Low Item Group:  Matlab Compatibility
Status:  Fixed Assigned to:  juanpi
Originator Name:  Nabav Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 09 Feb 2018 05:35:00 AM UTC, comment #2: 

Using Octave ver. 4.2.1 with signal ver. 1.3.2 On Windows, I get


data = [3.7157e+03 3.7494e+03 3.9494e+03 4.3736e+03 5.1826e+03 6.8833e+03 1.2315e+04 5.0602e+04 1.7847e+03 5.4324e+03 4.9405e+04 1.6456e+04 8.1962e+03 5.8239e+03 4.7297e+03 4.1464e+03 3.8383e+03];
>> [i, p] = findpeaks(data)
i = [](1x0)
p = [](0x1)


Using findpeaks from https://sourceforge.net/p/octave/signal/ci/default/tree/inst/findpeaks.m I get:


>> [i, p] = findpeaks_new(data)
i =

   50602   49405

p =

    8   11


so the version from sf fixed the bug.

Avinoam Kalma <avinoam>
Group Member
Thu 08 Feb 2018 08:26:45 PM UTC, comment #1: 

Hi,

I have no clue how findpeaks is implemented in matlab, nor I have that software to test.

The implementation I provided in octave has several paratmers that you need to explore before claimiing that the peaks cannot be found. It can perfectly be that the defaults of octave's findpeaks do not match the behavior of the default mathwork's findpeaks.

If you can be more precise in your report I might invest time in "fixing" the functions. Otherwise I would flag this as "works for me"


octave-gui:2> data = [3.7157e+03 3.7494e+03 3.9494e+03 4.3736e+03 5.1826e+03 6.8833e+03 1.2315e+04 5.0602e+04 1.7847e+03 5.4324e+03 4.9405e+04 1.6456e+04 8.1962e+03 5.8239e+03 4.7297e+03 4.1464e+03 3.8383e+03];
octave-gui:3> [i p] = findpeaks(data)
i =

   50602   49405

p =

    8   11


alos make sure that you report bugs agaisnt the development version of the function which can be found here

https://sourceforge.net/p/octave/signal/ci/default/tree/

Juan Pablo Carbajal <juanpi>
Group Member
Thu 08 Feb 2018 12:13:09 PM UTC, original submission:  

Hello,
I have tested findpeaks function over this vector with two apparent peaks at indices 8 and 11.
data = [3.7157e+03   3.7494e+03   3.9494e+03   4.3736e+03   5.1826e+03   6.8833e+03   1.2315e+04   5.0602e+04   1.7847e+03   5.4324e+03   4.9405e+04   1.6456e+04   8.1962e+03   5.8239e+03   4.7297e+03   4.1464e+03   3.8383e+03];
The peaks could be found by Matlab online testing for the function findpeaks.
Thanks for investigating the case.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

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 mtmiller (Updated the item)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by juanpi (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-11 mtmiller StatusWorks For Me Fixed
        Open/ClosedOpen Closed
    2018-02-08 juanpi CategoryOctave Function Octave Package
        Severity3 - Normal 2 - Minor
        Priority5 - Normal 3 - Low
        StatusNone Works For Me
        Assigned toNone juanpi
        Release4.0.0 4.2.1
        Operating SystemGNU/Linux Any

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code