How to choose scales and input for code below using wavelets done by FFT?

3 visualizaciones (últimos 30 días)
Kim
Kim el 28 de Mzo. de 2013
Comentada: Jakub el 21 de Oct. de 2014
If anyone understands how to pick scales for cwt using FFT I would so appreciate the advice. I am using Torrence and Compo's code that has been adapted (below). However, all I know is how to find out using scal2frq the scale/frequency relationship. Here they are talking about fourier periods and talking about picking scales based on milliseconds which I am finding very confusing. I have EEG data, sampled at 256 Hz, length(n)=315 and I am interested in looking at the cross coherence between 4 and 15 hz. Thank you to anyone who can shed light on this!! Kim
Wavelet coherence % % USAGE: [Rsq,period,scale,coi,sig95]=wtc(x,y,[,settings]) % % % Settings: Pad: pad the time series with zeros? % . Dj: Octaves per scale (default: '1/12') % . S0: Minimum scale % . J1: Total number of scales % . Mother: Mother wavelet (default 'morlet') % . MaxScale: An easier way of specifying J1 % . MakeFigure: Make a figure or simply return the output. % . BlackandWhite: Create black and white figures % . AR1: the ar1 coefficients of the series % . (default='auto' using a naive ar1 estimator. See ar1nv.m) % . MonteCarloCount: Number of surrogate data sets in the significance calculation. (default=300) % . ArrowDensity (default: [30 30]) % . ArrowSize (default: 1) % . ArrowHeadSize (default: 1) % % Settings can also be specified using abbreviations. e.g. ms=MaxScale. % For detailed help on some parameters type help wavelet. % % Example: % t=1:200; % wtc(sin(t),sin(t.*cos(t*.01)),'ms',16) % % Phase arrows indicate the relative phase relationship between the series % (pointing right: in-phase; left: anti-phase; down: series1 leading % series2 by 90°) % % Please acknowledge the use of this software in any publications: % "Crosswavelet and wavelet coherence software were provided by % A. Grinsted." %
  1 comentario
Jakub
Jakub el 21 de Oct. de 2014
Yes you have to use scal2freq function.
Freq = scal2frq(1:fs,'wavelet name',1/fs);
To each wavelet at each scale corresponds some sin function. Frequency of this sin function is called central frequency of the wavelet. Nice examples aare in Matlab documentation.
Each wavelet detects some specific frequencies depending on its scale. In your case wavelet with scale 1 corresponds to frequency 128hz. So if you are intereste in frequencies 4-15Hz look at scales 8-32. (4Hz - scale 32).

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre EEG/MEG/ECoG en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by