1. A method of regulating a rotating electrical machine receiving as input a discrete control voltage determined to slave the electromagnetic torque delivered by said machine to a set point torque, said method consisting of determining at each sampling time said discrete control voltage to be applied to said machine as a function of at least one sampled signal representing the electromagnetic torque of said machine, so that the set point torque is reached at the next sampling time, which method includes a preparatory step of determining a discrete voltage control law of said machine in which said discrete control voltage to be applied at each sampling time is determined in the form of a first term corresponding to free evolution of the state of said machine in the absence of control, between the preceding sampling time and the current sampling time, and a second term dependent on said set point torque and a set point for the magnetic energy consumed by said machine, and, at each sampling time, a step of determining, with the aid of said discrete control law, the control voltage to be applied to said machine for the torque of said machine to reach said set point torque and the magnetic energy consumed by said machine to correspond to said set point magnetic energy.