bugGNU Octave - Bugs: bug #46781, [octave forge] (signal) specgram...

 
 

bug #46781: [octave forge] (signal) specgram flips sign of frequencies when given complex input as row vector

Submitted by:  None
Submitted on:  Wed 30 Dec 2015 05:43:09 PM UTC  
 
Category: Octave Forge PackageSeverity: 3 - Normal
Priority: 3 - LowItem Group: Matlab Compatibility
Status: NoneAssigned to: Mike Miller <mtmiller>
Originator Name: Alastair HarrisonOriginator Email: -unavailable-
Open/Closed: OpenRelease: other
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 01 Jan 2016 04:03:58 AM UTC, comment #2:

Since the specgram function is obsolete in Matlab, it would also be helpful to have a compatible implementation of the spectrogram function. See bug #45232.

Mike Miller <mtmiller>
Project AdministratorIn charge of this item.
Wed 30 Dec 2015 06:21:25 PM UTC, comment #1:

Mike M is the signal pkg maintainer.
the proposed fix looks correct to me.
see line 127 of specgram.m

Doug Stewart <dastew>
Wed 30 Dec 2015 05:43:09 PM UTC, original submission:

I don't know if Octave's specgram function is intended to allow complex input, but it has some strange behaviour when you do.

Consider the following example. When the input is a complex column vector, we get the expected result. When the input is a row vector, specgram actually shows us the spectrogram of the complex conjugate of the input.

The problem appears to be with this line:

For complex input, the apostrophe operator both transposes and takes the complex conjugate. A fixed version performs only a transpose:

As an aside, I believe that the matlab version of specgram detects complex input and displays both positive and negative frequencies. It would be great if the octave version could do something similar, rather than just chopping off everything above the Nyquist frequency.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Updated the item)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by dastew (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 13 Aug 2017 01:50:35 PM UTCjweSummarysignal package: specgram flips sign of frequencies when given complex input as row vector=>[octave forge] (signal) specgram flips sign of frequencies when given complex input as row vector
    Tue 29 Mar 2016 05:59:50 PM UTCmtmillerAssigned toNone=>mtmiller
    Fri 01 Jan 2016 04:03:58 AM UTCmtmillerPriority5 - Normal=>3 - Low
      Item GroupIncorrect Result=>Matlab Compatibility
      Release4.0.0=>other
      Summaryspecgram flips sign of frequencies when given complex input as row vector=>signal package: specgram flips sign of frequencies when given complex input as row vector

    Back to the top


    Powered by Savane 3.1-cleanup1