MATLAB: Sort 3D data into Bins

.binhistposition;sortvoxel

Hi,
I have a matrix containing 3D position data. i.e. The first row of "A" contains the first X,Y and Z coordinate of a point. I want to create a 3D matrix (say 150 x 150 x 150 elements) and sort the positional data into these voxels. The 3D matrix elements would contain the number of points that lie in that voxel.
I'm currently using three for loops which is very slow.
Any ideas that are more efficient?
Thanks
Related Question