help > Not displaying edges
Showing 1-2 of 2 posts
Display:
Results per page:
May 5, 2020  06:05 PM | Giulia Baracchini - McGill University
Not displaying edges
Hi,

 I created both my edge and node files to display my correlation matrix. I set the correlations I don't want to display to 0 before creating the edge file. Yet, I have some trouble plotting my matrix and I believe it's due to some hidden characters in my ascii files? 

When I select "draw all nodes" and don't give color to the edges, I don't get any error. However, when I select "draw all nodes that have connections" and color the edges based on the 4th column of my node file, I get the following error:

Index in position 1 is invalid. Array indices must be positive integers or
logical values.

Error in BrainNet>DrawLine (line 3858)
set(Line,'FaceColor',EC.edg.CM(surf.cylinder(i,5),:));
Error in BrainNet>PlotLine4 (line 3335)
DrawLine(surf,j,2,1);
Error in BrainNet>FileView (line 4267)
PlotLine4(surf,a,flag,centerX);
Error in BrainNet>NV_m_LF_Callback (line 4981)
a=FileView;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet('NV_m_LF_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating Menu Callback.

I attached my edge file.

Thank you in advance for your help,
Giulia
May 6, 2020  06:05 AM | Mingrui Xia
RE: Not displaying edges
Hi, would you please try to replace NaN values to zeros?

Best,
Mingrui
Originally posted by Giulia Baracchini:
Hi,

 I created both my edge and node files to display my correlation matrix. I set the correlations I don't want to display to 0 before creating the edge file. Yet, I have some trouble plotting my matrix and I believe it's due to some hidden characters in my ascii files? 

When I select "draw all nodes" and don't give color to the edges, I don't get any error. However, when I select "draw all nodes that have connections" and color the edges based on the 4th column of my node file, I get the following error:

Index in position 1 is invalid. Array indices must be positive integers or
logical values.

Error in BrainNet>DrawLine (line 3858)
set(Line,'FaceColor',EC.edg.CM(surf.cylinder(i,5),:));
Error in BrainNet>PlotLine4 (line 3335)
DrawLine(surf,j,2,1);
Error in BrainNet>FileView (line 4267)
PlotLine4(surf,a,flag,centerX);
Error in BrainNet>NV_m_LF_Callback (line 4981)
a=FileView;
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in BrainNet (line 53)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)BrainNet('NV_m_LF_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating Menu Callback.

I attached my edge file.

Thank you in advance for your help,
Giulia