Applying generalized conjugate gradient method,we design an algorithm to compute the D anti-symmetric solutions for the consistent matrix equations,the algorithm can also compute the optimal approximation solution.The numerical example shows that the algorithm is effective.