---
# System prepended metadata

title: Matlab for STFT

---

Matlab for STFT
===
* ##read wav
```matlab
filename = 'output.wav';
[y,fs2] = audioread(filename);
```
[document](https://ww2.mathworks.cn/help/matlab/ref/audioread.html?requestedDomain=zh)

* ##STFT
```matlab
s = spectrogram(y,64,48);
```
[document](https://ww2.mathworks.cn/help/signal/ref/spectrogram.html)


* ##SAVE array
```matlab
save('testspeech.mat','s');
```

* ##python read .mat(type:dict)
```python
import scipy.io
mat = scipy.io.loadmat('testspeech.mat')
```

