Determination of the coronal magnetic field and the radio-emitting electron energy from a Type IV solar radio burst