The magnetization current required for any given flux level can be found from Figure P2-2, or alternately
from the equivalent table in file p22_mag.dat. The MATLAB program shown below calculates the
flux level at each time, the corresponding magnetization current, and the rms value of the magnetization
current.