The Centroid property for each blob is a row vector of length (number of dimensions of input data) -- so for 2D arrays it would be a vector of length 2, for each blob; for 3D arrays it would be a vector of length 3.
pulls out those row vectors for each blob and does a horzcat() operation on them. That will get you a row vector (ndims * numblob) long. You then transpose that, getting a (ndims * numblob) column vector. You attempt to assign that into
blobCentroid = zeros(numberOfBlobs,3)
which is only numberOfBlobs long, not numberOfBlobs * ndims. It is not going to fit.
You should consider,
blobCentroid = zeros(numberOfBlobs, 2, 3);
blobCentroid(:,:,1) = horzcat(blobMeasurementsHue.Centroid);
I suggest, though, that you think a bit more about what you are calculating. When you use that form of regionprops, the locations of the blobs are determined by the first parameter, the labeled image, and the centroids are not going to change no matter what intensity values you pass in the second position. If you want the locations to change based on intensity values, you need to look at WeightedCentroid in which case the intensity at each point on the blob will act like a local mass -- so you would get like the "brightness center". Which, I would suggest to you, probably does not make any sense for Hue or Value, but maybe would have some meaning for Saturation. Hue is especially problematic for this, since Hue is like an angle, so hues "just before" 0 can have high hue values.