The precise measurement of the local value of the beta-function at the place of a beam size monitor is necessary for the precise determination of the beam emittance. We developed a new method for the measurement of the beta-function by using of continuous square-wave modulation of the force of the quadrupole and by continuous tune tracking. Measurements were performed at LEP in order to evaluate the precision that can be achieved with this method in the LHC. The paper describes the method and discusses in details the results obtained at LEP for colliding and non-colliding beams