Artificial synapse created from nanowire memristor