The present publication discloses a device and method for generating magnetic pulses and directing them to brain. The device in accordance with the invention comprises means (15) for generating short, high energy current pulses (18), means (7) for controlling amplitude (16) of the current pulses (18), means (1) for generating high energy electromagnetic field stimulation pulses from the current pulses (18) and directing them to brain, and means (6, 14) for measuring biologic responses to the stimulation pulses. In accordance with the invention the device includes means (7) for creating such a pulse sequence (17) of electromagnetic pulses where the amplitude (18) varies irregularly.