issue with tmaxGND in MATLAB R2015a
aschetti opened this issue · 7 comments
Good day David,
my name is Antonio and I am an enthusiastic user of your toolbox... thanks so much!
Unfortunately, I am currently having problems running the tmaxGND function.
CODE
load([massunivpath exp '_' expphase '.GND'],'-mat') % load GND file
% the GND file looks fine:
% headinfo(GND)
% CHANNELS
% 1:Fp1 2:AF7 3:AF3 4:F1 5:F3 6:F5 7:F7 8:FT7
% 9:FC5 10:FC3 11:FC1 12:C1 13:C3 14:C5 15:T7 16:TP7
% 17:CP5 18:CP3 19:CP1 20:P1 21:P3 22:P5 23:P7 24:P9
% 25:PO7 26:PO3 27:O1 28:Iz 29:Oz 30:POz 31:Pz 32:CPz
% 33:Fpz 34:Fp2 35:AF8 36:AF4 37:Afz 38:Fz 39:F2 40:F4
% 41:F6 42:F8 43:FT8 44:FC6 45:FC4 46:FC2 47:FCz 48:Cz
% 49:C2 50:C4 51:C6 52:T8 53:TP8 54:CP6 55:CP4 56:CP2
% 57:P2 58:P4 59:P6 60:P8 61:P10 62:PO8 63:PO4 64:O2
%
% BINS
% Bin 1: negativeLargeDark
% Bin 2: negativeSmallDark
% Bin 3: negativeLargeBright
% Bin 4: negativeSmallBright
% Bin 5: neutralLargeDark
% Bin 6: neutralSmallDark
% Bin 7: neutralLargeBright
% Bin 8: neutralSmallBright
% Bin 9: all
%
% t-TESTS
% No t-test results have been stored with these data.
% run the tmax function
tmaxGND(GND,9,'n_perm',numbperm,'save_GND','no','output_file','no');
% output
% Experiment: SizeContEmo_main
% 40 out of 40 participants have data in relevant bin.
% Time Window #1:
% Attempting to use time boundaries of 0 to 9.960938e+02 ms for hypothesis test.
% Exact window boundaries are 0 to 9.960938e+02 ms (that's from time point 52 to 307).
% Testing null hypothesis that the grand average ERPs in Bin 9 (all ) have a mean of 0.000000 microvolts.
% Alternative hypothesis is that the ERPs differ from 0.000000 (i.e., two-tailed test).
% mxt_perm1: Number of channels: 64
% mxt_perm1: Number of time points: 256
% mxt_perm1: Total # of comparisons: 16384
% mxt_perm1: Number of participants: 40
% t-score degrees of freedom: 39
% Executing permutation test with 5000 permutations...
% Permutations completed: 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
% 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2000
% 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900, 3000
% 3100, 3200, 3300, 3400, 3500, 3600, 3700, 3800, 3900, 4000
% 4100, 4200, 4300, 4400, 4500, 4600, 4700, 4800, 4900, 5000
% Desired family-wise alpha level: 0.050000
% Estimated actual family-wise alpha level: 0.050000
% Critical t-score(s):-4.5619 4.5619
ERROR
% Undefined function or variable 'eml_is_const'.
% Error in cdf (line 9)
% coder.internal.assert(eml_is_const(name),'Coder:toolbox:InputMustBeConstant','NAME');
%
% Error in tmaxGND (line 476)
% tw_alpha=(1-cdf('t',max(abs(crit_t)),n_sub-1))*2;
Possible reason
I recently switched from Matlab R2012b (where everything worked perfectly) to R2015a. Could it be related to version differences in the way graphics are displayed?
VERSIONS
OS version: Windows 7 SP1
Matlab version: R2015a
EEGLAB version: 14.1.1b
Thanks for your help!
I should also add that the same error occurs when I exclude the creation of all plots:
tmaxGND(GND,9,'n_perm',numbperm,'plot_gui','no','plot_mn_topo','no','plot_raster','no','save_GND','no','output_file','no');
It seems to be related to the built-in cdf function...
Hi Eric,
thanks for the quick reply. Typing which cdf gives me the following:
D:\OneDrive - UGent\SizeContEmo\scripts\scripts_EEG\toolboxes_functions\stats\eml\cdf.m
Thus, I'm calling the cdf function from the stat toolbox... isn't that correct?
Also, thanks for the great job on the FMUT toolbox! I've played with it today but ended up with an error similar to what I'm reporting here (presumably, both toolboxes use the same function).
Thanks,
Antonio
Hi Eric,
I deleted the other source and now everything works fine... thanks!
FYI, I simply copy/pasted the folder with the stats toolbox from the default path (C:\Program Files\MATLAB\R2015a\toolbox\stats) to the new path (*D:\OneDrive - UGent\SizeContEmo\scripts\scripts_EEG\toolboxes_functions\stats*). I have done this several times and never encountered incompatibility issues... until today.
Anyway, thanks again for your help and the great work!
Greets,
Antonio