Counting number of each characters in a given textfile
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello everyone, i am trying find a solution to count the number of each character(alphabet) . I have to find how many times each elements of alphabet used in a given textfile saved on my pc. Ok i found number of all characters but i do not know how to specify code for 'each' elements used in textfile. I have to show these numbers on histogram by comparing the avarege of each character. For ins. : 'e' is used 12 times in a textfile which has 100 characters and 'b' is used 14 times in a textfile and then histogram must be distribution of each elements.Please i am stuck help me. Thank in advance.
0 commentaires
Réponses (1)
Walter Roberson
le 25 Fév 2012
Read the entire file in to one string, and run the histogram and that string.
Hint: the maximum possible character value in MATLAB is 65535.
0 commentaires
Voir également
Catégories
En savoir plus sur Text Files dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!