frequency of letters in English message

4 views (last 30 days)
i have a massage such as plain= 'my name is samah samir and i am engineer';
1- i want to compute the frecuancy of each letter in this message and compute this relation the sum of the diffrance between the static frequancy in english language and the frequancy of each letter in your plain .

Accepted Answer

Star Strider
Star Strider on 13 Sep 2021
One approach —
plain= 'my name is samah samir and i am engineer';
ltrs = double(plain);
ltrs = ltrs(ltrs>32)-double('a')+1;
figure
histogram(ltrs, 26)
xticks(1:26)
xticklabels(compose('%c','a':'z'))
Experiment to get diferent results.
.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!