1
function y=escalon(r,des) %escalon(RANGO,DESPLAZAMIENTO DESDE 0) aux=1; for i=1:length(r) if i==1 if (min(r))<des y=0; elseif (min(r))>=des && aux==1 y=sumal(r,1); aux=0; else end else if (min(r)+i-1)<des y=[y,0]; elseif (min(r)+i-1)>=des && aux==1 y=[y,sumal(r(i:1:end),1)]; aux=0; else end end end

Escalon

Embed Size (px)

DESCRIPTION

EscalonMatlab

Citation preview

function y=escalon(r,des)%escalon(RANGO,DESPLAZAMIENTO DESDE 0)aux=1;for i=1:length(r) if i==1 if (min(r))<des y=0; elseif (min(r))>=des && aux==1 y=sumal(r,1); aux=0; else end else if (min(r)+i-1)<des y=[y,0]; elseif (min(r)+i-1)>=des && aux==1 y=[y,sumal(r(i:1:end),1)]; aux=0; else

end end end