In this paper the gradient based iterative algorithm is presented to solve the linear matrix equation AXB + CXT D = E, where X is unknown matrix, A, B, C, D, E are the given constant matrices. It is proved that if the equation has a solution, then the unique minimum norm solution can be obtained by choosing a special kind of initial matrices. Two numerical examples show that the introduced iterative algorithm is quite efficient.