We present a method of analysing line profile variations in (non-)radially pulsating stars in order to determine the degree l and the azimuthal number m of the mode(s). Balona (1986a,b;1987;1989) has proposed a quantitative method that should provide an objective criterion to determine and m. We extend this method and illustrate how it can be used on observed line profiles. The first three moments of the profiles are used to compute a discriminant which is a function of l,m, the inclination angle i of the star and its pulsation velocity amplitude v(p). The most likely set of values (l,m,i,v(p)) is defined as the one for which the discriminant reaches a minimum. The remaining velocity parameters can then be obtained by substituting the values of (l, m, i, v(p)) in the moments. The algorithm is applicable when the rotation period is substantially larger than the period of a pulsation cycle. We tested the method on some theoretically generated profiles and applied it on spectra of the beta Cephei star delta Ceti. Agreement is good for this well known radially pulsating star. However, even in this simple case, the line-profile-fitting is not perfect.