Metal-matrix nanocomposite coating produced by electrodeposition