trentool / TRENTOOL3

Open-Source MATLAB toolbox for transfer entropy estimation
http://trentool.github.io/TRENTOOL3/
GNU General Public License v3.0
56 stars 26 forks source link

example_script_CPUmethod.m error #7

Closed dwuab closed 9 years ago

dwuab commented 9 years ago

I ran example_script_CPUmethod.m on Matlab2014a (Mac OS 10.10.3) with fieldtrip-20150601 and got the following error:

Checking number of permutationsOperands to the || and && operators must be convertible to logical scalar values.

Error in TEsurrogatestats (line 515)
    elseif nrtrials>31 && cfg.numpermutation > 2^31

Error in InteractionDelayReconstruction_calculate (line 103)
    TGA_results=TEsurrogatestats(cfgTESS,dataprep);

Error in example_script_CPUmethod (line 67)
TGA_results = InteractionDelayReconstruction_calculate(cfgTEP,cfgTESS,data);

with a little bit of debugging, I found that nrtrials was a a vector with two elements [150 150] and cfg.numpermutation was 50000.

trentool commented 9 years ago

That is right, the function should use the maximum over the vector ntrials. I fixed this, thank you for pointing this out.

Best, Patricia