function [I,time] = StepCurrent(p,dt,tmax)
% STEPCURRENT make a step current

time = (dt:dt:tmax)';
I = ones(size(time))*p.holding;
I(find(time>p.start & time<=p.stop)) = p.step;
