Column labels are missed after "corrcoef" function

1 view (last 30 days)
I have a matrix with 50 columns and 10 rows. The 1st row is name of each column followed by 10 rows of numbers. Correlation coeff. are obtained between all possible pairs across the 50 columns, and the R values are extracted by
RPairs = [nchoosek(1:size(data,2),2), nonzeros(tril(R,-1))];
However, in the output RPairs file, all the column names are missed and are labelled as column numbers instead. e.g.
1 2 0.34
1 3 0.67
1 4 0.78
1 5 0.95
...
How can I get RPairs with the column names as I input?
Thank you, any help will be appreciated.

Answers (0)

Community Treasure Hunt

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

Start Hunting!