Bayesian Decoding of Neural Electrical Signals with a State-Space Model