How to compare strings in a cell-array and sort them?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
These are 2 cell-array, respectively list={'a','b','c','a','e','f','g'}; and list_short={'a','b','c','a'}; that contains the first four elements of 'list'.
I would like to compare the element in 'list_short' and if two of them are equals (like 'a'), change the first of them with the fifth in 'list' and shift the six and seven as five and six and the removed 'a' as seven.
The two cell-array will be: list={'a','b','c','a','f','g','a'}; and list_short={'e','b','c','a'};
Thanks in advance!
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!