A model of magnetic stimulation of neocortical neurons