I guess you want to do the following:
1. Compute misorientations for some grains of same phase or different phase - does not matter
mori = calcMisorientation(grains)
2. compute the misorientation angles in degree
omega = angle(mori) / degree;
3. compute the histogram with a certain number of bins (here 20)
[counts,bins] = hist(angle,20)
counts gives you the number of angles in a certain bin
bins gives you the bin angles
I hope this helps,
Ralf.