Add generalized matrix indices