How to isolate duplicate strings in cell array?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Janani Guru
el 28 de Mzo. de 2022
Respondida: Mathieu NOE
el 28 de Mzo. de 2022
I have a large cell array like:
words =
613×1 cell array
{'still'}
{'while'}
{'until'}
{'light'}
{'still'}
{'built'}
{'field'}
{'child'}
{'build'}
{'liked'}
{'until'}
{'plain'}
{'alike'}
{'alive'}
.
.
.
I am trying to isolate repeat words and output them in my command window
output:
'still'
'until'
How do I go about doing this? I am having issues with the unique function.
Thank you for your help!
0 comentarios
Respuesta aceptada
Mathieu NOE
el 28 de Mzo. de 2022
hello
here you are :
a = [ {'still'};
{'while'};
{'until'};
{'light'};
{'still'};
{'built'};
{'field'};
{'child'};
{'build'};
{'liked'};
{'until'};
{'plain'};
{'alike'};
{'alive'}];
[C,IA,IC] = unique(a);
output = a;
output(IA) = [];
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre String Parsing 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!