labelling elements in an array
1 view (last 30 days)
Show older comments
I have a matrix G with
labelsG = {'Delusions','Hallucinations','Flattened','Inappropriate','Poverty','Thought'};
I have performed constrained PCA and a rotation to get a new variable, Predictor_weights. Each element of Predictor_weights is how much a given column of G (symptom) can predict variation in another matrix (Z).
I took the four most extreme values of Predictor_weights, and called this new variable absmax_Predictor_weights.
[~, index] = sort(abs(Predictor_weights), 'descend');
absmax_Predictor_weights = Predictor_weights(sub2ind(size(Predictor_weights), index(1:4, :), repmat(1:size(Predictor_weights, 2), 4, 1)));
MY QUESTION:
How can I assign my labels of G to the numeric elements of absmax_Predictor_weights? Each numeric element of absmax_Predictor_weights relates to a column of G.
Hope that makes sense, and thank you!
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!