In this paper, control of linear time-invariant plants by sampled-data output feedback control with generalized, piecewise constant hold functions is considered. An iterative algorithm is proposed which yields a sub-optimal solution to the linear quadratic regulator problem. The hold function is obtained by alternatingly improving closed-loop behaviour at sampling instants and intersample behaviour. Because the solution is guaranteed stable, this algorithm provides a computationally simple method for stabilization by output feedback. A numerical example is presented for a harmonic oscillator.