help > RE: Running NBS from script rather than GUI
Feb 24, 2026  12:02 AM | Andrew Zalesky
RE: Running NBS from script rather than GUI

An example dataset is provided. I recommend getting the example dataset running and then evaluating how your dataset differs from the example dataset.


Best, 


Andrew


 


Originally posted by jtanne98:



Thank you! 

I tried that with the below code and generated an error. Should the connectivity matrix be NxNxM where N is number of nodes and M is number of subjects? 

      GLM.perms=1000;  
      GLM.X =X_use; % nsubjx4
      GLM.y = C_use;    % nnode x nnode x nsubj
      GLM.contrast   =contrast_use; %[ 0 1 0 0]
      GLM.test  =     'ttest'; 
      Test_Stat=NBSglm(GLM)    


But received the following error 


Error using  \ 
Arguments must be 2-D, or at least one argument must be scalar. Use LDIVIDE (.) for elementwise left divide or use PAGEMLDIVIDE to apply left matrix division
to the pages of N-D arrays.


Error in NBSglm (line 88)
    b=GLM.X(:,ind_nuisance)\GLM.y;



 

Threaded View

TitleAuthorDate
jtanne98 Feb 23, 2026
jtanne98 Feb 26, 2026
Andrew Zalesky Feb 23, 2026
jtanne98 Feb 23, 2026
RE: Running NBS from script rather than GUI
Andrew Zalesky Feb 24, 2026