The influence of the magnetic-field profile in the gyrotron interaction space on the generation efficiency and frequency was experimentally studied. A profiled magnetic field was created by a system of several low-inductance coils. It is shown that it is possible to increase the generation efficiency by ~1.3 times, which is comparable with the results that are obtained using single-stage recuperation of the residual electron-beam energy. In this case, the proposed method is easier to implement and can be used jointly with the recuperation. It is also demonstrated that it is possible to control the generation frequency within a range of at least twice the width of the radiation spectrum with characteristic times of the order of milliseconds. This allows one to believe that the gyrotron frequency-stabilization circuit can be successfully performed using small changes in the magnetic field.