# Diskretni modeli rasta

crtaj(niz):=wxplot2d ([discrete, makelist(n,n,0,length(niz)-1),niz],[style,points],[xlabel, "n"],[ylabel,"B_n"],[y,0,lmax(niz)*1.2]);

## Eksponencijalni model rasta

R:2;
B[0]:1;
B[n]:=R*B[n-1];

niz: makelist(B[n],n,0,10);
crtaj(niz);

B[20];

B[100];

## Beverton-Holtov model rasta

kill(B);
K:1000;
R:2;
B[0]:1;
B[n]:=R*B[n-1]/(1+(R-1)*B[n-1]/K);

niz: makelist(float(B[n]),n,0,20);
crtaj(niz);

kill(B);
K:1000;
R:2;
B[0]:1000;
B[n]:=R*B[n-1]/(1+(R-1)*B[n-1]/K);

niz: makelist(float(B[n]),n,0,20);
crtaj(niz);

kill(B);
K:1000;
R:2;
B[0]:500;
B[n]:=R*B[n-1]/(1+(R-1)*B[n-1]/K);

niz: makelist(float(B[n]),n,0,20);
crtaj(niz);

kill(B);
K:1000;
R:2;
B[0]:2000;
B[n]:=R*B[n-1]/(1+(R-1)*B[n-1]/K);

niz: makelist(float(B[n]),n,0,20);
crtaj(niz);

## Logistički model rasta

kill(a);
R:1.5;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:2;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:2.75;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:3;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:3.2;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:3.52;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,20);
crtaj(niz);

kill(a);
R:3.8;
a[0]:0.01;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,30);
crtaj(niz);

kill(a);
R:3.8;
a[0]:0.02;
a[n]:=R*a[n-1]*(1-a[n-1]);
niz: makelist(float(a[n]),n,0,30);
crtaj(niz);