フィルターのクリア

Compute average size of 2 regions in a matrix

2 ビュー (過去 30 日間)
Johanna Popp
Johanna Popp 2021 年 12 月 22 日
コメント済み: Image Analyst 2022 年 1 月 2 日
Hi all,
I would like to normalze a structural connectivity matrix (360 x 360) containing the number of streamlines between any two regions by the (average/sum) size of the respective two regions.
I do have information about the size of each brain regions (360) but what I would like to do is average the size of two regions and save that number in a Matrix (360 x 360) so that each node contains information about the average size of the two regions.
Any help would be appreciated, thanks!!
  3 件のコメント
Johanna Popp
Johanna Popp 2022 年 1 月 2 日
編集済み: Johanna Popp 2022 年 1 月 2 日
You're right, that could be helpful. Lets say I have a vector of 5 numbers [2 4 8 9 12]. I want to create a matrix with the size 5*5 containing the average of each of the respective pairs of numbers in the corresponding field of the matrix. In this case it would be
[2 3 5 5.5 7; 3 4 6 6.5 8; 5 6 8 8.5 10; 5.5 6.5 8.5 9 10.5; 7 8 10 10.5]
Instead of the 5*1 vector that I provided here as a example, I am working with a vector containing 360 numbers.
I hope this helps, thank you!
Image Analyst
Image Analyst 2022 年 1 月 2 日

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

回答 (1 件)

Pranjal Kaura
Pranjal Kaura 2021 年 12 月 28 日
Hey Johanna,
Could you please share a snippet of the data file? Further providing an example on that data would also be helpful.
  1 件のコメント
Johanna Popp
Johanna Popp 2022 年 1 月 2 日
Hi Pranjal,
please refer to my response on the comment above for an example! Thank you for your help!

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

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by