open-discussion > Error with extraction of graph theory measures
Showing 1-1 of 1 posts
Results per page:
Sep 19, 2022  03:09 PM | Jose Teles
Error with extraction of graph theory measures
Dear experts,
I have a 90x90 connectivity matrix and am trying to extract graph theory measures using the brain connectivity toolbox, in particular the characteristic path length.

I used the following code:
load('01_DWI_FP_MD_C_trafo_Tracts_CSD_FA_PASS' )
>> charpath(CM)

But then I get the following error message "Error using charpath. The distance matrix must not contain NaN values"

I checked and indeed there are several NaN values in the matrix can anyone provide suggestion on how to sort this error? Should the NaN be replaced by real values and if so how to do this? 0 or 1 values?

Sorry but I am very new to programming and any suggesting would be welcomed. I also attach the matrix
Thanks in advance,