[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: Problem with ploting and some other stuff

**From**: |
Ivo Babarovic |

**Subject**: |
Re: Problem with ploting and some other stuff |

**Date**: |
Wed, 03 Mar 1999 22:47:58 +0100 |

John W. Eaton wrote:
>* On 2-Mar-1999, Ivo Babarovic <address@hidden> wrote:*
>
>* | BTW: try the function , it's quite interesting.*
>
>* What function? Comma? That's not a function, but whatever. What is*
>* interesting about it?*
>
>* jwe*
Hi there!
Function itself was written in the body of the message.
What is interesting about it?:
My humble opinion about what's interesting is how a convergence
(or divergence from a=3 to 4) is changing for iterative formula
x[i+1]=a*x[i]*(1-x[i]);
I think you get some kind of fractal or something.
I'll attach the two functions to the message.
bye
ivo

% try it with
% a=2:0.01:4 , change step (3:0.001:4)
% m=100
% n=20 here I get the problems. If I put n>24 I get
% errors with gnuplot
% Try it with diferent m and n
% x is a starting point of iteration usualy 0.5
function A=itera1(a,x,m,n)
A=[];
for i=1:m
x=quadd(a,x);
end
for i=1:n
A=[A;x];
x=quadd(a,x);
end
plot(a,A,'.');

% this is just a function quadd calld by itera1
function y=quadd(a,x);
y=a.*x.*(1-x);