Solution to a type of high-order nonhomogeneous generalized Sylvester equations