Index in position 2 exceeds array bounds (c_null_model_udn_sign)

Submitted by CHL on

 

Dear all,

I get an error when using c_null_model_udn_sign to generate null models.

Index in position 2 exceeds array bounds (must not exceed 697).

The error happens when I create 1000 randomized subject data with  c_null_model_udn_sign.

If I create less randomized subject data, like 300 or 500, it works well.

Does anyone know how to solve the problem? It looks like that I need to edit the function, but I have no idea how to do it.

The following are details of my setting

Subject: 47 subjects divided into 2 groups, controls and patients.

CorrMatrix: 116 x 116 or smaller matrix (I thought the error may be due to the size of matrics, but both get the same problem)

Network Construction:

Threshold: Relative

Weight: no change

Generate 1000 randomized subject data (null model) with "c_null_model_udn_sign" (binary and weighted) and 1 interaction

Network Threshold: 0.1, 0.15, 0.2, 0.25, 0.3

 

Network Calculations:

(Both binary and weighted)

Betweenness centrality, cluster coefficient (global and local), characteristic path length (global and local), degree, and efficiency (global and local).

Click Use random network to calc smallworldness.

 

Raw Matrix:

Click Raw Matrix and "r to z"

Weights" no change

 

GLM:

Between covariates: age, TIV

Between factors: group, gender

 

Graph matrics: permutation, 1000 times

Raw matrics: permutation, 1000 times

 

The error messages are:

 

Index in position 2 exceeds array bounds (must not exceed 697).

 

Error in CalcVars (line 779)

                        Result = ResultRandVar(:,i_rand);

 

Error in GraphVar_calc (line 93)

[res,shuffelFiles] =

CalcVars(dialogData.thresholds,dialogData.thresholdType,dialogData.brainD,dialogData.functionList,handles.vpFiles,'TaskPlaner',allTasks,'MatrixName',dialogData.MatrixName,'FilePos',dialogData.subjectNamePos,

'DoRandom',get(handles.RandomNetwork_check,'Value'), 'nRandom', dialogData.nRandom,

'RandomFunction' ,randomNetwork_func ,  'RandomIterations' , dialogData.randomIter,

'Smallworldness', get(handles.RandomNetwork_smallWorld,'Value'), 'randomForType',

[get(handles.binary_check,'Value'),get(handles.weighted_check,'Value')],'pValueField',handles.sigField,'TestAgainstRandom',strcmp(dialogData.random_network,'graph_randNW'),'DoShuffelRandom',get(handles.shuffel_check,'Value'),'NShuffelRandom',dialogData.nShuffel,'Normalize',dialogData.normalize,'RandomRaw',dialogData.shuffleRandom,'RandomRawIter',dialogData.RandomRawIter,'NoCorr',noCorr,'InterimResult',InterimResultsID,'weightAdjust_Thr',dialogData.weightAdjust_Thr,'DynamicGraphVar',

dialogData.DynamicGraphVar,'n_multislice', dialogData.n_multislice,'n_alpha',

dialogData.n_alpha);

 

Error in GraphVar>Btn_calcCorr_Callback (line 73)

[res allTask] = GraphVar_calc(handles);      %%%%%%???????

 

Error in gui_mainfcn (line 95)

        feval(varargin{:});

 

Error in GraphVar (line 40)

    gui_mainfcn(gui_State, varargin{:});

 

Error in

matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)GraphVar('Btn_calcCorr_Callback',hObject,eventdata,guidata(hObject))

 

{C}{C}

Error while evaluating UIControl Callback.

 

Forums