Pie chart with a limited number of slices

1 view (last 30 days)
Henrik
Henrik on 24 Feb 2012
Hi!
I need to add a pie chart to the code below which only shows the ten most occurring letters in a text. Please help me to get this right.
fid=fopen('krypterad1.txt','rt');
text = fscanf(fid,'%c',Inf);
text = upper(text);
nummer = double(text);
sorterad = sort(text, 'descend')
pie(sorterad)
n = histc(nummer, 65:90);
for n =65:90;
for antal=1:n;
end
end
f = input('byt från ','s')
t = input('till ','s')
diff = double(t) - double(f)
for rulla = nummer+(diff)
if rulla<=64, rulla=rulla+26; end
if rulla>90, rulla=rulla-26; end
okodadtext = char(rulla);
fprintf('%s', okodadtext);
end
Thank you!
Best Regards/Henrik

Answers (0)

Tags

Products

Community Treasure Hunt

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

Start Hunting!