Graph theory measures - Brain connectivity toolbox

Dear Sirs,
I am trying to extract graph theory measures using the brain connectivity toolbox (BCT).
I have created the connectivity matrices in ExploreDTI (see image attached with the output of the weighted and binary matrices).
Then I added the files with the CMs and the BCT to Matlab (by going into set path and add folder and save - see attached)
I then used the command window to type the functions in order to get the graph theory measures but I end up getting an error (see below an example where I try to extract efficiency measure from a binary CM):
>> efficiency_bin.m ('06_DWI_FP_MD_C_trafo_Tracts_CSD_binary_PASS')
Unable to resolve the name efficiency_bin.m.
I get the error message “Unable to resolve the name efficiency_bin.m” and I am now stuck.
Can anyone provide input on what can be the reason for this error?
Thank you.
Best wishes,
Jose Teles

1 件のコメント

原
2022 年 6 月 28 日
excuse me,could you tell me how to start BCT in Matlab?The code I press into mtalab always shows error,brain connectivvty?or sth else?thanks a lot!

サインインしてコメントする。

 採用された回答

Walter Roberson
Walter Roberson 2022 年 1 月 3 日

0 投票

efficiency_bin('06_DWI_FP_MD_C_trafo_Tracts_CSD_binary_PASS')
Do not include the ".m" part of the name when invoking a function.

7 件のコメント

Jose Teles
Jose Teles 2022 年 1 月 4 日
Dear Walter Robertson,
Thank you for the reply your suggestion eliminated the error. If perhaps you could help with another question/error message that I have encounter while trying to run a graph measure of global efficiency on my weighted CM as listed below:
>> rout_efficiency ('06_DWI_FP_MD_C_trafo_Tracts_CSD_FA_PASS')
Index in position 1 exceeds array bounds. Index must not exceed 1.
Error in distance_wei_floyd (line 104)
i2k_k2j = bsxfun(@plus, SPL(:,k), SPL(k,:));
Error in rout_efficiency (line 74)
Erout = distance_wei_floyd(D,transform); % pair-wise routing efficiency"
What does Index in position 1 exceeds array bounds. Index must not exceed 1 means? How can I solve this issue?
Thank you
Walter Roberson
Walter Roberson 2022 年 1 月 4 日
% Inputs:
%
% D,
% Weighted/unweighted directed/undirected
% connection *weight* OR *length* matrix.
%
But what you passed in is a character vector, not a connection matrix.
Jose Teles
Jose Teles 2022 年 1 月 4 日
Thank you again. But I am a bit confused now because the ExploreDTI manual refers to these files created as connectivity matrices (CMs) (see attached a print of the manual referring to the very same files I have extracted as CMs)
I have also attached the .mat file perhaps this could help? Not sure how to move along
Walter Roberson
Walter Roberson 2022 年 1 月 4 日
You have to load the .mat file and pull the variable CM out of it.
Jose Teles
Jose Teles 2022 年 1 月 4 日
Hello again I think I am not following your suggestions correctly
I tried to copy the .mat to the BCT folder (my current directory) then loaded the .mat file and tried to get the global efficiency measure but still get the same error message (see below)
"
>> load ('06_DWI_FP_MD_C_trafo_Tracts_CSD_FA_PASS')
>> rout_efficiency ('06_DWI_FP_MD_C_trafo_Tracts_CSD_FA_PASS')
Index in position 1 exceeds array bounds. Index must not exceed 1.
Error in distance_wei_floyd (line 104)
i2k_k2j = bsxfun(@plus, SPL(:,k), SPL(k,:));
Error in rout_efficiency (line 74)
Erout = distance_wei_floyd(D,transform); % pair-wise routing efficiency
"
I think I am misinterpreting your feedback perhaps you could provide input on the steps? Sorry I really appreciate your patience is just that I am very new to matlab
Walter Roberson
Walter Roberson 2022 年 1 月 4 日
load('06_DWI_FP_MD_C_trafo_Tracts_CSD_FA_PASS')
rout_efficiency(CM)
Jose Teles
Jose Teles 2022 年 1 月 4 日
Many thanks for your advise it worked:) have a great day

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeElectrophysiology についてさらに検索

質問済み:

2022 年 1 月 3 日

コメント済み:

原
2022 年 6 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by