how to compare letters of a word with one another to check reoccurrence of a character?

1 visualización (últimos 30 días)
i am working on an algo to watermark text documents using multiple occurrences of letters and need to calculate re- occurrence of a character in a word.any help i have read the text file sentence by sentence and also found no of words per each sentence now i want to store all the words in a sentence in a separate array and then for all the words in a sentence match the first letter of each word with all the remaining letters of the same word to check re occurrence. for example if the sentence is 'text watermarking is difficult' then t occurs two times in text and r occur two times in watermarking so the requires or desired output would be 'twd'.i hope now u can understand what i am trying to ask
  1 comentario
Jan
Jan el 17 de Jun. de 2013
This is a vague question only. Could you explain any details? Some examples might reveal, what you want to achieve.
Please insert them in the original question and not in the comment or answers section.

Iniciar sesión para comentar.

Respuestas (1)

Jan
Jan el 18 de Jun. de 2013
str = 'statement';
pool = unique(str);
count = histc(str, pool);

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by