Given a document and a word, determining wherape that word is in the document and how many times it appears
Info
This question is closed. Reopen it to edit or answer.
Show older comments
So assuming we let D be a document consisting of words d1,…dn, which are separated by single spaces. Words can appear several times in D. I need to write a function WordIndex(D) which would return the following cell array C C{k,1}= d C{k,2}=The set of all locations where d appears in D
By location of d we mean index of the first character of d in the string D. For example let D=‘this is just just the very very simple test’ Then C{3,1}=’just’ C{3,2}= {9,14}
1 Comment
Walter Roberson
on 30 Mar 2011
You have accidentally left out the question that you wish to ask us. What specifically would you like assistance with?
Answers (0)
This question is closed.
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!