This is the histc function I was working on to go with Octave but never really finished. It isn't very efficient and it didn't pass all of the test cases I could think of (weird empty inputs and similar corner cases). You should probably use the histc.m that now ships with Octave (although it doesn't match Matlab on all corner cases either). The comments that I wrote while working out how histc behaves might be useful.
Name Last modified Size Description
histc.m 2009-11-10 00:33 4.4K dimfun.m 2009-11-10 14:15 468 cellmap.m 2009-11-10 14:16 731 dimmap.m 2009-11-10 14:16 630