Matlab Subscripted Assignment Dimension Mismatch Par For The Course

I am currently trying to use graph-Var on my matrices obtained fromn EEG Connectivity analyses and get an error measure while using the statistics GUI:

----------

Error using cell/ismember (line 27)
Input must be cell arrays of strings.

Error in GraphVar_getDialogData>check_StructureName (line 361)
if(sum(~ismember(name,handles.vpNamesNeo)) && isFirst) && handles.FragCheck ~= 1

Error in GraphVar_getDialogData (line 54)
if(~check_StructureName(handles,forCalcFunc))

Error in GraphVar_calc (line 29)
[returnVal,dialogData] = GraphVar_getDialogData(handles,1,noCorr);

Error in GraphVar>Btn_calcCorr_Callback (line 73)
[res allTask] = GraphVar_calc(handles);

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in GraphVar (line 40)
    gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('Btn_calcCorr_Callback',hObject,eventdata,guidata(hObject))

 
Error while evaluating uicontrol Callback

--------

I have already tried to rename the Subjects-ID in the Variables-sheet and the .mat files..Nothing has worked until now.

Additionally I had problems with a few network parmeters:

1) Clustering coefficient:

Error using  ./
Matrix dimensions must agree.

Error in clustering_coef_wu (line 21)
C=cyc3./(K.*(K-1));         %clustering coefficient

Error in clusterMean_wu (line 2)
    D = mean(clustering_coef_wu(W));

Error in CalcVars (line 606)
                                ResultRandVar{i_extSub,r_idx,i_dyn} = eval([functionList{i_func}
                                '(ResultRand{i_extSub,r_idx,i_dyn})']);

Error in GraphVar_calc (line 85)
[res,shuffelFiles] =
CalcVars(dialogData.thresholds,dialogData.thresholdType,dialogData.brainD,dialogData.functionList,handles.vpFiles,'TaskPlaner',allTasks,'MatrixName',dialogData.MatrixName,'FilePo
Error in GraphVar_CalcExport_Callback (line 42)
[res allTasks] = GraphVar_calc(handles,1);

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in GraphVar (line 40)
    gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('GraphVar_CalcExport_Callback',hObject,eventdata,guidata(hObject))

 

2) Small-World-Propensity:

 

Error while evaluating uicontrol Callback

Output argument "SWP" (and maybe others) not assigned during call to "G:\Masterarbeit
Daten\GraphVar\GraphVar_beta_v_06.2\src\ext\Network Community Toolbox\small_world_propensity.m>small_world_propensity".

Error in CalcVars (line 606)
                                ResultRandVar{i_extSub,r_idx,i_dyn} = eval([functionList{i_func}
                                '(ResultRand{i_extSub,r_idx,i_dyn})']);

Error in GraphVar_calc (line 85)
[res,shuffelFiles] =
CalcVars(dialogData.thresholds,dialogData.thresholdType,dialogData.brainD,dialogData.functionList,handles.vpFiles,'TaskPlaner',allTasks,'MatrixName',dialogData.MatrixName,'FilePo
Error in GraphVar_CalcExport_Callback (line 42)
[res allTasks] = GraphVar_calc(handles,1);

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in GraphVar (line 40)
    gui_mainfcn(gui_State, varargin{:});

Error in @(hObject,eventdata)GraphVar('GraphVar_CalcExport_Callback',hObject,eventdata,guidata(hObject))

 
Error while evaluating uicontrol Callback

 

3)

Subscripted assignment dimension mismatch.

Error in GraphVar_CalcExport_Callback (line 108)
                    globalOut(:,globalC) = [tmpFunctionList{i_func} ; rot90(Result,3)];

Error in gui_mainfcn (line 96)
        feval(varargin{:});

Error in GraphVar (line 40)
    gui_mainfcn(gui_State, varargin{:});

I am trying to solve the set of 3 differential equations:

dTs(1) = 2*gd*Ts(3)-Ts(1)/TT(j)-aa*(Ts(1)^2+Ts(2)^2)/(TT(j)*GG(j)); dTs(2) = -Ts(2)/TT(j)-aa*(Ts(1)^2+Ts(2)^2)/(TT(j)*GG(j)); dTs(3) = gd*Ts(2)-Ts(3)/TT(j)-aa*Ts(3)*(Ts(1)+Ts(2))/(TT(j)*GG(j))-2*gd*GG(j);

whereas the factors TT(j) and GG(j) are in a loop. When I run the code I receive the error message: "Subscripted assignment dimension mismatch", and It looks like the ODE module fails to converge at t>~100s. In this case I sometimes cut the higher end of tspan (called tx in my code) to times that are smaller than 100 and then the code delivers a solution, but I need the response at larger times too. It might also help to know that the factor aa should be very small (<1e-6) in order for the code to deliver any solution. Here the entire code:

tx=[0 100] for j=1:iGT % Solving the DE for individual relaxation modes j [tt,Ts] = ode23(@fTs,tx,[0 0 0]); T110(:,j)=Ts(:,1); T220(:,j)=Ts(:,2); T120(:,j)=Ts(:,3); endfunction dTs=fTs(t,Ts) dTs = zeros(3,1); % a column vector dTs(1) = 2*gd*Ts(3)-Ts(1)/TT(j)-aa*(Ts(1)^2+Ts(2)^2)/(TT(j)*GG(j)); dTs(2) = -Ts(2)/TT(j)-aa*(Ts(1)^2+Ts(2)^2)/(TT(j)*GG(j)); dTs(3) = gd*Ts(2)-Ts(3)/TT(j)-aa*Ts(3)*(Ts(1)+Ts(2))/(TT(j)*GG(j))... -2*gd*GG(j); end

0 thoughts on “Matlab Subscripted Assignment Dimension Mismatch Par For The Course”

    -->

Leave a Comment

Your email address will not be published. Required fields are marked *