brain-networks / local_scfc

8 stars 5 forks source link

Euclidean distance calculation #1

Open Makliya opened 2 months ago

Makliya commented 2 months ago

I attempted to calculate the Euclidean distance matrix between the regional centers of mass using the provided sc and fc matrices. However, the result does not match the Euclidean distance matrix provided in the repository.

Could you please assist me in identifying the issue or guide me on how to correctly calculate the Euclidean distance based on our sc and fc matrices? Thank you.

faskowit commented 2 months ago

Hello @Makliya -- what regional centers are you referring to? The .mat file provided in the repository has distance, fc, hemisphere labels, bins, and structural connectivity provided. We didn't include the ROI centroid data here, which if I remember correctly, was taken from the MNI space volumetric atlas. If you have Nx3 array of centroids, you can easily get the euclidean distance matrix using the command squareform(pdist(your_centroid_data)). The squareform command formats the pdist data nicely into a square.

Makliya commented 2 months ago

Hi @faskowit. Thank you for your prompt response. I see that I need to use the coordinates of the regional centers of mass. There were minor problems with the command I ran, but I've resolved them now. Thank you.