help > Array bounds error
Showing 1-2 of 2 posts
Display:
Results per page:
Apr 25, 2023  03:04 PM | Caroline Diehl
Array bounds error
Hi,

I'm getting this error when running one of my models in NBS, although a similar model ran smoothly. I'm running a between-group t-test with [-1 1] as the contrast.


The logical indices contain a true value outside of the array bounds.

Error in NBSstats (line 175)
ind=ind_upper(STATS.test_stat(i,:)>STATS.thresh);
Error in NBSrun (line 323)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSstats(nbs.STATS,-1,nbs.GLM); end
Error in NBS>get_ui (line 194)
NBSrun(UI,S);
Error while evaluating UIControl Callback.


Would you be able to advise on the source of the error?

Thanks!
Caroline
Apr 26, 2023  01:04 AM | Andrew Zalesky
RE: Array bounds error
hi Caroline, 

it is difficult to diagnose the issue based on this limited error message.

Given that one of your models is working correctly, I suggest systematically considering the differences between the correct model and the one that is not working. Hopefully this process of deduction will identify the problem. 

The error does not seem to relate to the contrast. Might want to check that the size of the connectivity matrices has not changed. 

best, Andrew

Originally posted by Caroline Diehl:
Hi,

I'm getting this error when running one of my models in NBS, although a similar model ran smoothly. I'm running a between-group t-test with [-1 1] as the contrast.


The logical indices contain a true value outside of the array bounds.

Error in NBSstats (line 175)
ind=ind_upper(STATS.test_stat(i,:)>STATS.thresh);
Error in NBSrun (line 323)
catch; [nbs.NBS.n,nbs.NBS.con_mat,nbs.NBS.pval]=NBSstats(nbs.STATS,-1,nbs.GLM); end
Error in NBS>get_ui (line 194)
NBSrun(UI,S);
Error while evaluating UIControl Callback.


Would you be able to advise on the source of the error?

Thanks!
Caroline