help > index exceeds matrix dimensions
Dec 11, 2018  02:12 PM | Yuyang Luo
index exceeds matrix dimensions
Dear experts,

I am using BrainNet viewer to display my results. Actually, I have 160 nodes. Thus, I have a node file which contains 160 nodes' information, including MNI coordinate, the modular number, the node value, as well as the node name. And I also have an edge file containing the functional connectivity matrix (160 x 160). Since I only have two modulars, when I draw the figure, the matlab showed me the following errors.
index exceeds matrix dimensions.

Error in BrainNet>DrawLine (line 1712)
length_cyl=norm(sphere(surf.cylinder(i,2),1:3)-sphere(surf.cylinder(i,1),1:3))-sphere(surf.cylinder(i,2),7)-sphere(surf.cylinder(i,1),7);
Error in BrainNet>PlotLine1 (line 1606)
DrawLine(surf,j);
Error in BrainNet>FileView (line 1946)
PlotLine1(surf);
Error in BrainNet>NV_m_LF_Callback (line 2637)
a=FileView;
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
@(hObject,eventdata)BrainNet('NV_m_LF_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uimenu Callback


One more question is that on the setup panel, when I setup the color for each modular. The code could not identify the number of modular I have. 
Could you please help me if you have any solutions for these. Thank you very much.

Best,
Leo

Threaded View

TitleAuthorDate
index exceeds matrix dimensions
Yuyang Luo Dec 11, 2018
Yuyang Luo Dec 12, 2018