This is the correct MATLAB implementation of the discretization method appearing in the paper "A Discretization Algorithm Based on Class-Attribute Contingency Coefficient" by Tsai et al., 2008.
If you tried some other implementations and you don't receive the same results reported in the paper, it is because those implementations are WRONG and in some cases INCOMPLETE.
I tested my code with the data provided in the paper and all of my discretization ranges, CACC values and discretized data are the same as in the paper.
The file 'main.m' contains an example which uses the CACC function for discretizing some data used in the paper.
If you find any bugs in my code please report them so that I can fix them.
Bug #1 squashed! Thanks to Rahul for his comments about Line #156