Materials having magnetic properties