Synthesis and magnetic properties of cobalt nanocubes