How to number a set of row labels, then apply those numerical labels to a set of the same row labels that are in a different order?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
For example: matrix01 = abc123,GGAAFFVV;abc328,FFAATTRREEDD;abc9354,LSPSDKSDDD numerical_index_matrix01 = 1,GGAAFFVV;2,FFAATTRREEDD;3,LSPSDKSDDD
matrix02 = abc328,FFAATTRREEDD;abc123,GGAAFFVV;abc9354,LSPSDKSDDD numerical_index_matrix02 = 2,FFAATTRREEDD;1,GGAAFFVV;3,LSPSDKSDDD
So the order of these labels and their sequences is getting mixed up by external software, and I want to be able to use the initial numerical index scheme to index the new order, while reflecting the new order. Starts as a;b;c;d;e. Indexed as 1,a;2,b;3,c;4,d;5,e. Comes back as c;a;e;d;b and I want to get this result: 3,c;1,a;5,e;4,d;2,b.
This has my head spinning, any suggestions are appreciated.
2 commentaires
Jan
le 21 Juin 2011
What type is "c;a;e;d;b"? Are these cell strings or is this an abstract descritpion of a numerical vector? It would be helpful if you use proper Matlab syntax.
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!