Closed aschetti closed 6 years ago
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 Aschetti,
The error seems to be occurring in the function cdf, which is a MATLAB function for getting information from various probability distributions. However, the error you are getting does not seem to correspond to the MATLAB cdf function (i.e., line 9 in that function is comments, not code).
Try typing
which cdf at the MATLAB command line and let us know what it returns.
Eric
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/gutchess/, Brandeis University 617-552-2231 eric.fields@bc.edu
On Thu, Oct 12, 2017 at 5:31 AM, aschetti notifications@github.com wrote:
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 https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/issues/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!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/issues/6, or mute the thread https://github.com/notifications/unsubscribe-auth/AWR4AEdE25zzNRt6_iQiqEXCDIZTsWO1ks5srdx8gaJpZM4P2uQ7 .
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 Antonio,
What has happened is that a function called cdf from another source has taken precedence over the cdf function from MATLAB's stats toolbox.
You can fix this by going to Set Path and clicking Default. This will restore MATLAB's default path settings. It will remove anything you've added to the path, so you'll probably have to reset some things, but make sure you don't add the folder containing the alternate cdf function permanently to the path.
If you need to have that folder on the path, you may need to rename the other cdf.m function (and then change any scripts/functions that call it).
Eric
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/gutchess/, Brandeis University 617-552-2231 eric.fields@bc.edu
On Thu, Oct 12, 2017 at 11:35 AM, aschetti notifications@github.com wrote:
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
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/issues/6#issuecomment-336175739, or mute the thread https://github.com/notifications/unsubscribe-auth/AWR4AEhUkFqxTOwL1F4rTLZ_mx1Pi4plks5srjHCgaJpZM4P2uQ7 .
FYI, when I type >>which cdf it looks like this:
C:\Program Files\MATLAB\R2017b\toolbox\stats\stats\cdf.m
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/gutchess/, Brandeis University 617-552-2231 eric.fields@bc.edu
On Thu, Oct 12, 2017 at 11:48 AM, Eric Fields eric.fields@bc.edu wrote:
Hi Antonio,
What has happened is that a function called cdf from another source has taken precedence over the cdf function from MATLAB's stats toolbox.
You can fix this by going to Set Path and clicking Default. This will restore MATLAB's default path settings. It will remove anything you've added to the path, so you'll probably have to reset some things, but make sure you don't add the folder containing the alternate cdf function permanently to the path.
If you need to have that folder on the path, you may need to rename the other cdf.m function (and then change any scripts/functions that call it).
Eric
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/gutchess/, Brandeis University 617-552-2231 <(617)%20552-2231> eric.fields@bc.edu
On Thu, Oct 12, 2017 at 11:35 AM, aschetti notifications@github.com wrote:
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
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/issues/6#issuecomment-336175739, or mute the thread https://github.com/notifications/unsubscribe-auth/AWR4AEhUkFqxTOwL1F4rTLZ_mx1Pi4plks5srjHCgaJpZM4P2uQ7 .
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
Thanks for the speedy help, Eric! David
On Oct 12, 2017 11:55 AM, "Eric Fields" notifications@github.com wrote:
FYI, when I type >>which cdf it looks like this:
C:\Program Files\MATLAB\R2017b\toolbox\stats\stats\cdf.m
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/ gutchess/, Brandeis University 617-552-2231 <(617)%20552-2231> eric.fields@bc.edu
On Thu, Oct 12, 2017 at 11:48 AM, Eric Fields eric.fields@bc.edu wrote:
Hi Antonio,
What has happened is that a function called cdf from another source has taken precedence over the cdf function from MATLAB's stats toolbox.
You can fix this by going to Set Path and clicking Default. This will restore MATLAB's default path settings. It will remove anything you've added to the path, so you'll probably have to reset some things, but make sure you don't add the folder containing the alternate cdf function permanently to the path.
If you need to have that folder on the path, you may need to rename the other cdf.m function (and then change any scripts/functions that call it).
Eric
Eric Fields, Ph.D. Postdoctoral Fellow Cognitive and Affective Neuroscience Laboratory https://www2.bc.edu/elizabeth-kensinger/, Boston College Aging, Culture, and Cognition Laboratory http://www.brandeis.edu/gutchess/, Brandeis University 617-552-2231 <(617)%20552-2231> <(617)%20552-2231> eric.fields@bc.edu
On Thu, Oct 12, 2017 at 11:35 AM, aschetti notifications@github.com wrote:
Hi Eric, thanks for the quick reply. Typing which cdf gives me the following: D:\OneDrive - UGent\SizeContEmo\scripts\scriptsEEG\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
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/ issues/6#issuecomment-336175739, or mute the thread https://github.com/notifications/unsubscribe- auth/AWR4AEhUkFqxTOwL1F4rTLZ_mx1Pi4plks5srjHCgaJpZM4P2uQ7 .
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dmgroppe/Mass_Univariate_ERP_Toolbox/issues/6#issuecomment-336181785, or mute the thread https://github.com/notifications/unsubscribe-auth/AEM4XxpwG0LAcGdxaLzLaugfLwNw-NL7ks5srjZQgaJpZM4P2uQ7 .
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!