From 2006.igem.org
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
% generates the input signal, i.e. defines the shape of S
function Y=input_signal(x,Tx)
%Y=0.5*(1+sign(sin(x.*2.*pi./Tx))); % rectangular signal (initially high), periode Tx
%Y=0.5*(1-sign(sin(x.*2.*pi./Tx))); % rectangular signal (initially low), periode Tx
%Y=0.5*(1+(sin(x.*2.*pi./Tx))); % Sine, periode Tx
%Y=0.5*(1+sign(sin(x.*2.*pi./Tx))).*0.5.*(1+sign(sin(x.*2.*pi./(2*Tx))));
% rectangular signal (with delay between peaks), periode 2Tx
Y=0.5*(1+(sin((x-Tx/4).*2.*pi./Tx))).*0.5.*(1+sign(sin(x.*2.*pi./(2*Tx))));
% sine-like pulse signal (with delay between peaks), periode 2Tx