help > Error : covariates 2nd level - Index exceeds number of array elements
Showing 1-6 of 6 posts
Display:
Results per page:
Jan 7, 2020  03:01 PM | Vasudev Devulapally - LMU Munich
Error : covariates 2nd level - Index exceeds number of array elements
Dear all,

When i try to provide different covariates for 2nd level analysis , i am incurring an error which suggests index exceeds number of array elements

I have counted the array index and it exactly matches the number of subjects that i have .

I have few functional files where number of functional slices are irregular, for 20 subjects i have 250 slices and for the rest of the subjects  i have 300 slices. does this cause the error described below.


Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:

Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:
Jan 14, 2020  05:01 AM | Yuko Hakamata - National Center for Neurology and Psychiatry
RE: Error : covariates 2nd level - Index exceeds number of array elements
Dear CONN experts,

I ran into the exactly same error that Vasudev had.

I have 100 subjects. After preprocessing was finished (the display said "Preprocessing was finished correctly"), I opened the "2nd Covariates" window in the Setup. But, the following error message came up as soon as I opened the window. As Vasudev did, I checked the number of array elements, but it matched the number of subjects (n = 100). Furthermore, when I did preprocessing using the exactly same imaging files but in a half of the same sample (it was simply divided, n = 50 for each), it worked perfectly for either one, with no problem.

Could someone please tell me why the error occurred?
I'd like to just know why the error occurs only when the sample gets combined (n = 100).

---
Index exceeds the number of array elements (100).
Error: conn_menu (line 839)
for n1=1:size(title,1),set(position.h4(1+n1),'xdata',n1+[0 0],'ydata',[0 title(n1)],'zdata',title(n1)+[1 1],'linestyle',':','marker','none','color',[.5 .5 .5],'tag','none');end
Error: conn (line 4238)
conn_menu('updateplotsingle',CONN_h.menus.m_setup_00{5},tt');
Error: conn (line 1458)
[varargout{1:nargout}]=conn('gui_setup',varargin{3:end});
Error: conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + Anatomy DEM FieldMap MEEGtools conn marsbar wfupickatlas xjview xjviewBN
Matlab v.2019b
project: CONN18.b
storage: 3683.6Gb available
---

Thank you very much in advance,

Yuko
Originally posted by Vasudev Devulapally:
Dear all,

When i try to provide different covariates for 2nd level analysis , i am incurring an error which suggests index exceeds number of array elements

I have counted the array index and it exactly matches the number of subjects that i have .

I have few functional files where number of functional slices are irregular, for 20 subjects i have 250 slices and for the rest of the subjects  i have 300 slices. does this cause the error described below.


Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:

Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:
Jan 14, 2020  09:01 AM | Yuko Hakamata - National Center for Neurology and Psychiatry
RE: Error : covariates 2nd level - Index exceeds number of array elements
Dear CONN experts,

I ran into the exactly same error that Vasudev had.

I have 100 subjects. After preprocessing was finished (the display said "Preprocessing was finished correctly"), I opened the "2nd Covariates" window in the Setup. But, the following error message came up as soon as I opened the window. As Vasudev did, I checked the number of array elements, but it matched the number of subjects (n = 100). Furthermore, when I did preprocessing using the exactly same imaging files but in a half of the same sample (it was simply divided, n = 50 for each), it worked perfectly for either one, with no problem.

Could someone please tell me why the error occurred?
I'd like to just know why the error occurs only when the sample gets combined (n = 100).

---
Index exceeds the number of array elements (100).
Error: conn_menu (line 839)
for n1=1:size(title,1),set(position.h4(1+n1),'xdata',n1+[0 0],'ydata',[0 title(n1)],'zdata',title(n1)+[1 1],'linestyle',':','marker','none','color',[.5 .5 .5],'tag','none');end
Error: conn (line 4238)
conn_menu('updateplotsingle',CONN_h.menus.m_setup_00{5},tt');
Error: conn (line 1458)
[varargout{1:nargout}]=conn('gui_setup',varargin{3:end});
Error: conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + Anatomy DEM FieldMap MEEGtools conn marsbar wfupickatlas xjview xjviewBN
Matlab v.2019b
project: CONN18.b
storage: 3683.6Gb available
---

Thank you very much in advance,

Yuko
Originally posted by Vasudev Devulapally:
Dear all,

When i try to provide different covariates for 2nd level analysis , i am incurring an error which suggests index exceeds number of array elements

I have counted the array index and it exactly matches the number of subjects that i have .

I have few functional files where number of functional slices are irregular, for 20 subjects i have 250 slices and for the rest of the subjects  i have 300 slices. does this cause the error described below.


Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:

Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:
Jan 15, 2020  11:01 AM | Alfonso Nieto-Castanon - Boston University
RE: Error : covariates 2nd level - Index exceeds number of array elements
Dear Yuko,

This was a very peculiar bug indeed in the function that displays your second-level covariates (the bug only shows up when you have precisely 100 subjects in your project), thank you for reporting this and my apologies for the problem!

To fix this please use the attached patch (this patch is for release 18b, to install it simply copy the attached file to the conn distribution folder overwriting the file with the same name there). Please let me know if you still run into any issues

Hope this helps
Alfonso
Originally posted by Yuko Hakamata:
Dear CONN experts,

I ran into the exactly same error that Vasudev had.

I have 100 subjects. After preprocessing was finished (the display said "Preprocessing was finished correctly"), I opened the "2nd Covariates" window in the Setup. But, the following error message came up as soon as I opened the window. As Vasudev did, I checked the number of array elements, but it matched the number of subjects (n = 100). Furthermore, when I did preprocessing using the exactly same imaging files but in a half of the same sample (it was simply divided, n = 50 for each), it worked perfectly for either one, with no problem.

Could someone please tell me why the error occurred?
I'd like to just know why the error occurs only when the sample gets combined (n = 100).

---
Index exceeds the number of array elements (100).
Error: conn_menu (line 839)
for n1=1:size(title,1),set(position.h4(1+n1),'xdata',n1+[0 0],'ydata',[0 title(n1)],'zdata',title(n1)+[1 1],'linestyle',':','marker','none','color',[.5 .5 .5],'tag','none');end
Error: conn (line 4238)
conn_menu('updateplotsingle',CONN_h.menus.m_setup_00{5},tt');
Error: conn (line 1458)
[varargout{1:nargout}]=conn('gui_setup',varargin{3:end});
Error: conn_menumanager (line 120)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN18.b
SPM12 + Anatomy DEM FieldMap MEEGtools conn marsbar wfupickatlas xjview xjviewBN
Matlab v.2019b
project: CONN18.b
storage: 3683.6Gb available
---

Thank you very much in advance,

Yuko
Originally posted by Vasudev Devulapally:
Dear all,

When i try to provide different covariates for 2nd level analysis , i am incurring an error which suggests index exceeds number of array elements

I have counted the array index and it exactly matches the number of subjects that i have .

I have few functional files where number of functional slices are irregular, for 20 subjects i have 250 slices and for the rest of the subjects  i have 300 slices. does this cause the error described below.


Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:

Index exceeds the number of array elements (100).
Error in conn_menu (line 839)
Error in conn (line 4238)
CONN18.b
SPM compiled
Matlab v.2018b
project: CONN18.b
storage: 310.7Gb available

ans =
logical
1
ERROR DESCRIPTION:
Attachment: conn_menu.m
Jan 15, 2020  04:01 PM | Vasudev Devulapally - LMU Munich
RE: Error : covariates 2nd level - Index exceeds number of array elements
I am using standalone version of CONN 18b, is there any fix for standalone version ?
Feb 28, 2020  11:02 AM | Yuko Hakamata - National Center for Neurology and Psychiatry
RE: Error : covariates 2nd level - Index exceeds number of array elements
Hi Alfonso,

Once I replaced the old file with new one, it worked perfectly!
Thank you so much for your great help, Alfonso! 

Yuko