Bragg diffraction of a matter wave driven by a pulsed nonuniform magnetic field