Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
why I am not getting a bifurcation diagram?

Subject: why I am not getting a bifurcation diagram?

From: Sanaa

Date: 20 Feb, 2013 12:20:09

Message: 1 of 4

Hi,
I am trying to plot a bifurcation diagram for Rossler discrete-time system.
What's wrong in my code?
I am only getting a line!!!!



itermax=300;min=itermax-9;% That is we plot from 291:300 i.e. 10 values of x only.
r=0.1;b=0.2;c=4;
for a=0:0.001:0.4
    x=0.1;
    x0=x;
    y=0.2;
    y0=y;
    z=0.3;
    z0=z;
    for n=1:itermax
    xn=x0-r*(y0+z0);
    yn=y0+r*(x0+a*y0);
    zn=z0+r*(b+x0*z0-c*z0);
    x=[x xn];
    x0=xn;
    y=[y yn];
    y0=yn;
     z=[z zn];
    z0=zn;
    end
 plot(a*ones(10),y(min:itermax),'b.','linewidth',2)
hold on
end
   xminmax = xlim;
line(xminmax, [0 0], 'Linewidth', 1,'Color','k')
    fsize=15;
    xlabel('a','FontSize',fsize)
    ylabel('\ity','FontSize',fsize)
    hold off
    %print(gcf, '-djpeg', '-zbuffer', 'bif01_standard.png');
    

Any help will be highly appreciated.
Thanks

Subject: why I am not getting a bifurcation diagram?

From: dpb

Date: 20 Feb, 2013 14:53:40

Message: 2 of 4

On 2/20/2013 6:20 AM, Sanaa wrote:
> Hi,
> I am trying to plot a bifurcation diagram for Rossler discrete-time system.
> What's wrong in my code?

Not knowing what a Rossler D-T system is, I don't know, but...

...

>
> itermax=300;
 > min=itermax-9;

...

I would strongly suggest to _NOT_ alias the Matlab function min() --
confusion can only result later. Name the variable iterMin or somesuch.

--

Subject: why I am not getting a bifurcation diagram?

From: Sanaa

Date: 20 Feb, 2013 15:54:12

Message: 3 of 4

dpb <none@non.net> wrote in message <kg2o1r$ri1$1@speranza.aioe.org>...
> On 2/20/2013 6:20 AM, Sanaa wrote:
> > Hi,
> > I am trying to plot a bifurcation diagram for Rossler discrete-time system.
> > What's wrong in my code?
>
> Not knowing what a Rossler D-T system is, I don't know, but...
>
> ...
>
> >
> > itermax=300;
> > min=itermax-9;
>
> ...
>
> I would strongly suggest to _NOT_ alias the Matlab function min() --
> confusion can only result later. Name the variable iterMin or somesuch.
>
> --
Thanks a lot for your comment. Actually, you suggest didn't change anything. I am still getting a line.
Any help please!

Subject: why I am not getting a bifurcation diagram?

From: dpb

Date: 20 Feb, 2013 18:20:56

Message: 4 of 4

On 2/20/2013 9:54 AM, Sanaa wrote:
...

> Thanks a lot for your comment. Actually, you suggest didn't change
> anything. I am still getting a line. Any help please!

No, of course not for the specific problem, but it certainly will when
you later try to use the min() function...

I've no clue on the actual question altho it seems like you continually
post such similar queries one would think you would begin to get the
picture of what has gone wrong in previous attempts and be able to
translate that knowledge to new cases...

--

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us