Export the mat file from phase lock value connectivity

Hi, all. I' calculated the phase lock value connectivity using the source-level data matrix which is 9004*7501 (verticals* time points). I get the connectivity values and export the mat file, it is 40540510, I thought it should be 9004* 9004 matrix so that I could use the N*N matrix to calculate the network characteristics. why it display that? How could I do to reshape the N*N structure? Thank you.

Since PLV is a symmetric connectivity metric, only the lower triangle (which includes the diagonal) is saved. See:

To recover the NxN matrix, use:

R = bst_memory('GetConnectMatrix', TfMat);

See more details in this section of the connectivity tutorial page:
https://neuroimage.usc.edu/brainstorm/Tutorials/Connectivity#On_the_hard_drive

Thanks a lot, I 'll tri it now, and it sees works.