It's quite useful to be able to clamp the membrane voltage of a cell you're simulating to a particular value. I have found myself wanting to clamp the voltage to a series of values, or even a whole voltage trace from another simulation. There isn't an easy way to do this in Chaste (yet - if I have time I'd like to make it into an easy function), so I'm sharing the bit of code I wrote to make it happen.
First, include ALL THE THINGS:
Continue reading Voltage clamping things in Chaste