Skip to content

Commit fb7d9e5

Browse files
authored
Update README.md
1 parent e99d47e commit fb7d9e5

File tree

1 file changed

+55
-2
lines changed

1 file changed

+55
-2
lines changed

README.md

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1-
# DGTtool
2-
A simple and user-friendly tool for computing STFT/DGT
1+
# DGTtool for computing STFT/DGT
2+
A simple and user-friendly MATLAB tool for computing the **short-time Fourier transform (STFT)** and the **discrete Gabor transform (DGT)**. It is designed to be **easy and fast** for practical use.
3+
4+
The following features of DGTtool might be different from the other tools:
5+
1. Parameters are stored inside DGTtool object for user-friendliness.
6+
2. All pre-computation runs only once so that repeated computation of DGT/STFT is fast.
7+
3. Many computations run in parallel for all channels (for multi-channel signal).
8+
4. Perfect reconstruction is very easily realized.
9+
5. Number of frequency bins can be smaller than the window length.
10+
6. Dual and tight windows can be computed easily.
11+
7. Sparse time-frequency representation (reassigned spectrogram) is implemented.
12+
8. Phase visualization tool (plotPhase) is implemented.
13+
9. STFT/DGT can be written in an operator form.
14+
15+
16+
# How to Use
17+
Download **DGTtool.m** and place it in the **Current Folder**.
18+
19+
## 1. Create DGTtool object
20+
Create a DGTtool object `F` by specifying its parameters.
21+
```
22+
F = DGTtool('windowShift',500,'windowLength',1500,'FFTnum',2000,'windowName','Blackman')
23+
```
24+
(Note: This step can be done without parameters: `F = DGTtool`. Unspecified parameters are set to default values.)
25+
26+
## 2. Compute spectrogram
27+
Compute a spectrogram `X` from a signal `x`.
28+
```
29+
X = F(x);
30+
```
31+
32+
## 3. Convert spectrogram back to signal
33+
Compute the signal `x` from its spectrogram `X`.
34+
```
35+
x = F.pinv(X);
36+
```
37+
38+
## 4. Visualize spectrogram
39+
Three visualization functions are implemented. A spectrogram is computed and plotted from a time-domain signal `x` (and sampling frequency `fs`, optional).
40+
```
41+
F.plot(x,fs)
42+
F.plotPhase(x,fs)
43+
F.plotReassign(x,fs)
44+
```
45+
46+
# Documentation
47+
To check all functions in DGTtool, please read and run **demo.m**.
48+
```
49+
help DGTtool
50+
```
51+
and
52+
```
53+
doc DGTtool
54+
```
55+
provide detailed usage.

0 commit comments

Comments
 (0)