Magnetomechanical measurements and their application to soft magnetic materials