Find count of repeated letters
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jothi
el 30 de Sept. de 2013
Comentada: Jothi
el 7 de Oct. de 2013
Sir,
How to find the no. of repeated sequence (letters) in the given sentence.
for example, a="I want THAAAAAT APPPPPLE ):):):";
The No. of repeated sequences are: 3
ie.,
1. THAAAAAT
2. APPPPPLE
3. ):):):
thanks
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 30 de Sept. de 2013
a='I want THAAAAAT APPPPPLE ):):):'
s=regexp(a,'\s+','split')
out=s(~cellfun(@(x) numel(unique(x))==numel(x),s))
3 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings 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!