How do I compute the mean correlation from a n by n correlation matrix?
26 ビュー (過去 30 日間)
回答 (1 件)
Jyotish Robin 2017 年 3 月 30 日
You could accomplish the task by making use of the functions 'tril' and 'mean'.
If a is your matrix, the following command returns the upper triangular elements (not including the diagonal elements) as a column vector:
Now if you do
It will give you the average of upper triangular entries of the matrix a.
In a similar way, you could deal with the lower triangular entries also. You could learn more about 'tril' and 'mean' functions from the following documentations:
Hope this helps!