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

조회 수: 1 (최근 30일)
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
Jan
Jan 2013년 6월 17일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Jan
Jan 2013년 6월 18일
str = 'statement';
pool = unique(str);
count = histc(str, pool);

태그

Community Treasure Hunt

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

Start Hunting!

Translated by