Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Math Forum
»
Discussions
»
Software
»
comp.softsys.matlab
Notice: We are no longer accepting new posts, but the forums will continue to be readable.
Topic:
how to calculate percentage of letter appear in text file
Replies:
1
Last Post:
Nov 16, 2013 1:55 PM




how to calculate percentage of letter appear in text file
Posted:
Nov 16, 2013 1:24 PM


this coding to count letter appearance in text file
fid=fopen('aaa.txt') F = fread(fid, '*char')' fclose(fid); letters = 'a':'z'; c=histc(F,letters); fprintf('"%c" occurs %d time(s)\n', [letters; c])
how to find the percentage of each letter occur in this coding (sorry for bad English)



