freqanalysis_wltconvol.m question

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Wed Nov 8 22:56:46 CET 2006

Hi Brian

On 8 Nov 2006, at 21:20, Brian Roach wrote:
> eI would like to take this complex output and use it to calculate
> phase-locking factor, but I am not sure what parts of the power
> transformation need to be removed - just the abs() and the
> squaring?  Clarification of this line of code would be extremely
> helpful to me.

You can use the existing code for that:

For computing the phase-locking value I suggest that you use either
   cfg.keeptapers='no' (not needed now)
   cfg.channelcmb = something, see the help
in freqanalysis.

Subsequently, use the option
in freqdescriptives. In case of fourier output in freqanalysis, you
should specify the channel combinations here.

Looking back at your previous mail, I see that you mean ITC and not
PLV. The stuff above then does not apply. You can do output=fourier
in freqanalysis and work manually on the output freq structure. I
think that this should work

magnitude = abs(freq.fourierspctrm);
scaled    = freq.fourierspctrm ./ magnitude;
freq.itcspctrm = mean(scaled, 1);
freq = rmfield(freq, 'fourierspctrm');   % remove the single
fourierspectrum, to avoid confusion
freq.dimord = 'chan_freq_time';          % remove the rpt or rpttap

best regards,

More information about the fieldtrip mailing list