function [tt, yy] = stepify(t, y)
%STEPIFY plot "digital output" with nice steps
% SEE ALSO: stairs

N = 2*length(t) - 1;

tt = zeros(N, 1);
yy = zeros(N, 1);

tt(1:2:N)   = t;
tt(2:2:N-1) = t(2:end);
yy(1:2:N)   = y;  
yy(2:2:N-1) = y(1:end-1);
