Error extracting graph theory measures - brain connectivity toolbox
1 回表示 (過去 30 日間)
古いコメントを表示
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? I also attach the connectivity matrix
Sorry but I am very new to programming and any suggesting would be welcomed.
Thanks in advance,
Jose
10 件のコメント
Walter Roberson
2022 年 9 月 23 日
It is not possible to reach that line of code without having executed
n = size(D,1);
which would have complained if D was not passed in to the function.
Please go back and re-run the charpath(CM) call ... after, that is, having changed the line
ecc = nanmax(D,[],2);
at line 72, to be
ecc = max(D,[],2,'omitnan');
and saving the charpath.m file.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!