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?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
Jan
2011-6-21
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.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!