The dimension of certain catalecticant varieties