Nonlinear evolution of wave packets in magnetic fluids