Demagnetization followed by remagnetization of waste NdFeB magnet for reuse