I am trying to recreate the following results:


...from the following data: Dropbox Link (FS40.dat)

The time is in milliseconds (frequency is 40000 Hz)

The article state that they used Complex Morlet wavelet to create the spectrogram: "Power estimates from the averaged LFPs were calculated from time–frequency spectrograms of the data from 1–88 Hz by convolving the signals with a complex Morlet wavelet of the form

$$ w(t,f_{0})=Ae^{(\frac{-t^2}{2\omega^2})}e^{(2i{\pi}f_{0}t)} $$

for each frequency of interest $f_{0}$, where $\omega=\frac{m}{2{\pi}f_{0}}$, and $i$ is the imaginary unit. The normalization factor was $A=\frac{1}{\omega(2{\pi})^0.5}$, and the constant $m$ defining the compromise between time and frequency resolution was 7.

I only managed to get some "good" results using spectrogram function in matlab. But I dont have much idea of how to use the morlet complex wavelet. I got bad result when trying to use cwt with 'morl' window

Thank You.


I'm trying to recreate this article:

Computational modeling of distinct neocortical oscillations driven by cell-type selective optogenetic drive: separable resonant circuits controlled by low-threshold spiking and fast-spiking interneurons.

  • $\begingroup$ Have you looked at the wavelet toolkit in matlab? You will probably have more success with your own convolution (conv) given the fairly specific conditions under which the data has been produced. $\endgroup$ – PAK-9 Nov 5 '13 at 23:52

Well I managed to find this MATLAB package


It does almost the same operation that as been done in the paper..

the related files in the package are: mf_tfcm.m & mf_cmorlet.m

| improve this answer | |
  • $\begingroup$ There is also a wavelet toolbox (mathworks.co.uk/products/wavelet) which may help $\endgroup$ – PAK-9 Oct 15 '13 at 15:47
  • $\begingroup$ @PAK-9 I dont think there is anything like the package I posted in the wavelet toolbox $\endgroup$ – user2236185 Oct 15 '13 at 16:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.