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

 
 

bug #45232: [octave forge] (signal) spectrogram function to replace legacy specgram function

Submitted by:  Nick Shmyrev <nshmyrev>
Submitted on:  Mon 01 Jun 2015 10:39:57 PM UTC  
 
Category:  Octave Forge Package Severity:  1 - Wish
Priority:  1 - Later Item Group:  Feature Request
Status:  Patch Submitted Assigned to:  None
Originator Name:  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.

 

Wed 09 Jan 2019 09:51:09 PM UTC, comment #3:

I'm attaching my current version. It includes more info in the docstring.

Mike: could we include this in the signal package now? Even though the docstring could use some more work, it is probably better than having no spectrogram function at all.

(file #45920)

John W. Eaton <jwe>
Project Administrator
Fri 05 Oct 2018 09:39:58 PM UTC, comment #2:

I started working on this function. I'm attaching my current version for testing and feedback. There are still some missing features (compute fc and tc outputs?) and probably some bugs. But the figures it produces look like the ones for the examples in the Matlab online docs for spectrogram now, at least as far as I can tell (to get exact results, you need to use the same colormap).

(file #45155)

John W. Eaton <jwe>
Project Administrator
Tue 02 Jun 2015 03:01:27 AM UTC, comment #1:

Thanks for your bug report. I'm categorizing this as a feature request to implement the spectogram function with all of the features in Matlab, such as the onesided option.

Mike Miller <mtmiller>
Project Administrator
Mon 01 Jun 2015 10:39:57 PM UTC, original submission:

According to Matlab documentation

http://de.mathworks.com/help/signal/ref/spectrogram.html

'onesided' — returns the one-sided spectrogram of a real input signal. If nfft is even, then pxx has length nfft/2 + 1 and is computed over the interval [0, π] rad/sample. If nfft is odd, then pxx has length (nfft + 1)/2 and the interval is [0, π) rad/sample. If you specify fs, then the intervals are respectively [0, fs/2] cycles/unit time and [0, fs/2) cycles/unit time.

specgram must return 257 points for nfft = 512. The current code returns 256 points only.

The suggested change is:

if rem(n,2)==1
ret_n = (n+1)/2;
else
ret_n = n/2 + 1;
endif
S = S(1:ret_n, :);

in specgram.m

Nick Shmyrev <nshmyrev>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #45920:  spectrogram.m-2019-01-09 added by jwe (18KiB - application/octet-stream)
file #45155:  spectrogram.m-2018-10-05 added by jwe (12KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by nshmyrev (Submitted 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 17 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-02-26 mtmiller StatusPostponed => Patch Submitted
        Assigned tomtmiller => None
        Releaseother => dev
    2019-01-09 jwe Attached File- => Added spectrogram.m-2019-01-09, #45920
    2018-10-19 mtmiller Carbon-CopyRemoved 80942 => -
    2018-10-05 jwe Attached File- => Added spectrogram.m-2018-10-05, #45155
    2018-04-03 mtmiller Priority5 - Normal => 1 - Later
        StatusConfirmed => Postponed
        Summary[octave forge] (signal) specgram function not equivalent to spectrogram => [octave forge] (signal) spectrogram function to replace legacy specgram function
    2017-08-13 jwe Summarysignal package: specgram function not equivalent to spectrogram => [octave forge] (signal) specgram function not equivalent to spectrogram
    2015-06-02 mtmiller Severity3 - Normal => 1 - Wish
        Item GroupIncorrect Result => Feature Request
        StatusNone => Confirmed
        Assigned toNone => mtmiller
        Releasedev => other
        Operating SystemGNU/Linux => Any
        Summaryspecgram function does not follow matlab => signal package: specgram function not equivalent to spectrogram

    Back to the top


    Powered by Savane 3.4