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

조회 수: 3 (최근 30일)
Kim
Kim 2013년 3월 28일
댓글: Jakub 2014년 10월 21일
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
Jakub
Jakub 2014년 10월 21일
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).

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 EEG/MEG/ECoG에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by