Magnetoresistance of carbon nanomaterials