A formalism for sequential estimation of neural membrane time constant and input–output curve towards selective and closed-loop transcranial magnetic stimulation* Matlab Code is available at https://github.com/smmalavi/TMS-tau-IOC-estim-fixed-tp. (1st October 2022)