1. A method for magnetic resonance spectroscopy (=MRS) or magnetic resonance imaging (=MRI), the method comprising the steps of: a) applying an RF excitation pulse to an object in a presence of an applied magnetic field, which may depend on spatial position and/or time, to create a time-domain signal, the time-domain signal being generated by an excited transverse nuclear magnetisation precessing about the applied magnetic field, wherein the RF excitation pulse is structured to cover a whole range of NMR frequencies of interest which are present in the object; b) recording the time-domain signal during or during and after application of the RF excitation pulse in step a); and c) reconstructing spectral or image data by a matrix product of a reconstruction matrix and a vector of time-domain signal points, the reconstruction matrix being an inversion of an encoding matrix A nα whose elements are calculated as follows: A n α = ∑ m = 0 n - 1 P m  Φ ( n , m , α ) wherein n is a running number of a time-domain signal point, α is a running number of a discrete image or spectral element, P m is an m-th discrete element of the RF excitation pulse in a time-domain, and Φ(n,m,α) is a phase accrued by the transverse nuclear magnetisation related to a discrete image or spectral element a in a time between the discrete RF excitation pulse element P m and the time-domain signal point n under an influence of the applied magnetic field.