Finding Probability of a digit in a data set

Ok, so I uploaded a data set using textscan:
fileID=fopen('filename');
if fileID < 3
disp('Error: file couldn''t be opened.')
else
C = textscan(fileID,'%f %f %f %f')
end
and I get a result,
C =
[3660x1 double] [3660x1 double] [3660x1 double] [3660x1 double]
in each column, there are a bunch of decimal numbers. What I want to do, not including the first column, is find the probability of the numbers 0-9, and a decimal point.
So if one of my columns is
C{2}=
1
1.0021
1.23
2.3
4.5
and so on, I want to find the probability of each individual digit occurring, not the probability of 1.23 occurring, but the probability of a 1,2,3,4,5,'.' occurring.
These probabilities will later be used to encode my data set using huffman.

Answers (0)

Categories

Asked:

on 23 Jul 2013

Community Treasure Hunt

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

Start Hunting!