frequency of letters in English message

5 次查看(过去 30 天)
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 .

采纳的回答

Star Strider
Star Strider 2021-9-13
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.
.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by