function dyn1d(lambda0,lambda1)
%DYN1D dynamisches System lambda*x*(1-x), Werteplot
%lambda im Intervall [lambda0,lambda1]
imgX=400;
imgY=400;
N0=1000;
N=1000;
if (nargin==0)
    lambda0=0;
    lambda1=4;
end
for l=1:imgX
    lambda=(l-1)/(imgX-1)*(lambda1-lambda0)+lambda0;
    x=rand;
    for i=1:N0
        x=stepfunc(x,lambda);
    end
    for i=1:N
        x=stepfunc(x,lambda);
        k=x*imgY;
        img(l,round(k)+1)=1;
    end
end
imagesc([0 1],[lambda0 lambda1],img)
colormap(bone)

end
function y=stepfunc(x,lambda)
y=lambda*x*(1-x);
end