Characterization of matrix types of ultramatricial algebras