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

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

[Octave-bug-tracker] [bug #39729] Signal library periodogram returns inc


From: anonymous
Subject: [Octave-bug-tracker] [bug #39729] Signal library periodogram returns incorrect result for row vector windows
Date: Thu, 08 Aug 2013 15:24:49 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:22.0) Gecko/20100101 Firefox/22.0

URL:
  <http://savannah.gnu.org/bugs/?39729>

                 Summary: Signal library periodogram returns incorrect result
for row vector windows
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Thu 08 Aug 2013 03:24:48 PM UTC
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: m.reich
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.6.4
        Operating System: Other

    _______________________________________________________

Details:

periodogram(x,win,...)returns an incorrect result if win is a row vector or if
win is a column vector whose length does not equal the length of parameter x. 
Here, '...'  represents be the remaining optional parameters.

In the current implementation of periodogram, lines 108 through 114 apply the
window 'win' only if either 
   (size (x) == size (window)
or if 
   (size (x, 1) == size (window, 1) && size (window, 2) == 1)
As a result,  if 'win' is a row vector whose length equals the length of 'x',
the window is not applied, although it would make sense to do so.  In the case
that the lengths of 'win' and 'x' do not match, it would make sense to flag an
error.

Moreover, since line 147 normalizes the periodogram by 'win'even if the window
was not applied, the function can return an incorrect result.  

Most window functions in the signal library work correctly as the 'win'
parameter since they return column vectors, e.g.
    size(blackman(1000))
But those which return row vectors need conversion to column a vector to work
correctly, e.g
    size(blackmanharris(1000))






    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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