function y=codificacionrec(z,bps,amp,t)

if t<0
    y=0;
elseif t>(length(z)/bps)
    y=0;
else
    for i=1:length(z)
        if (t>=(i-1)/bps & t<i/bps)
            y=pulsorec(t,z(i)*amp,1/bps,(i+i-1)/(2*bps));
        end
    end
end