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?
Mostra commenti meno recenti
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 Commenti
Jan
il 21 Giu 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.
Adam Quintero
il 21 Giu 2011
Risposte (0)
Categorie
Scopri di più su Common Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!