octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51657] gausswin produces slightly wrong resul


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #51657] gausswin produces slightly wrong result
Date: Fri, 11 Aug 2017 14:35:57 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #1, bug #51657 (project octave):

additionally:

matlab 2017a:

>> gausswin(0)

ans =

  0×1 empty double column vector

>> gausswin(1)

ans =

     1

>> gausswin(2)

ans =

   0.043936933623407
   0.043936933623407


Octave 4.2.1, signal 1.3.2, without your suggested change

>> gausswin(0)
error: gausswin: M must be a positive integer
error: called from
    gausswin at line 35 column 5
>> gausswin(1)
ans =  1
>> gausswin(2)
ans =

   0.457833361771614
   0.457833361771614


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

>> gausswin(0)
error: gausswin: M must be a positive integer
error: called from
    gausswin at line 35 column 5
>> gausswin(1)
warning: division by zero
warning: called from
    gausswin at line 40 column 5
ans = NaN
>> gausswin(2)
ans =

   0.0439369336234074
   0.0439369336234074


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.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51657>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]