In this short note we give an exact characterization of C*-algebras that have the class of convex functions. More precisely, we give a convexity characterization of subhomogeneous C*-algebras. We use these results to generalize the single function based convexity conditions for commutativity of a C*-algebra to the single function based convexity conditions for subhomogeneity.