15 lines
244 B
Matlab
15 lines
244 B
Matlab
## Author: Laurent
|
|
## Created: 2020-11-10
|
|
|
|
function freq = calcul_frequences (texte, alphabet)
|
|
|
|
freq = [];
|
|
|
|
for lettre = alphabet.'
|
|
freq = [freq; length(find(texte==lettre))/length(texte)];
|
|
endfor
|
|
|
|
freq = freq.';
|
|
|
|
endfunction
|