[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43515] Specgram example is wrong
From: |
Doug Stewart |
Subject: |
[Octave-bug-tracker] [bug #43515] Specgram example is wrong |
Date: |
Sun, 02 Nov 2014 02:35:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?43515>
Summary: Specgram example is wrong
Project: GNU Octave
Submitted by: dastew
Submitted on: Sun 02 Nov 2014 02:35:11 GMT
Category: Plotting
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Doug Stewart
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: Any
_______________________________________________________
Details:
the example given in specgram has a wrong Y axis
+verbatum+
## Speech spectrogram
[x, Fs] = auload(file_in_loadpath("sample.wav")); # audio file
step = fix(5*Fs/1000); # one spectral slice every 5 ms
window = fix(40*Fs/1000); # 40 ms data window
fftn = 2^nextpow2(window); # next highest power of 2
[S, f, t] = specgram(x, fftn, Fs, window, window-step);
S = abs(S(2:fftn*4000/Fs,:)); # magnitude in range 0<f<=4000
Hz.
S = S/max(S(:)); # normalize magnitude so that max is
0 dB.
S = max(S, 10^(-40/10)); # clip below -40 dB.
S = min(S, 10^(-3/10)); # clip above -3 dB.
imagesc(t, f, flipud(log(S))); # display in log scale
-verbatum-
Zero frequency is at the top left but should be at the bottom left.
Specgram works OK but the problem is with preparations and plotting with
imagesc
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43515>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43515] Specgram example is wrong,
Doug Stewart <=
- [Octave-bug-tracker] [bug #43515] Specgram example is wrong, Doug Stewart, 2014/11/01
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Mike Miller, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Mike Miller, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02
- [Octave-bug-tracker] [bug #43515] signal package: specgram example in docstring needs tweaking, Doug Stewart, 2014/11/02