The Computation of the Generalized Inverse of singular or Rectangular Matrices