Jump to content
Science Forums

Standard map in matlab


Recommended Posts

I programmed the standard map in matlab and now my PC at home (where I have no internet at moment) is turning since 20 hours to calculate it with many initial conditions. I f any of you has got time, I would be very thankful if someone could tell me how to speed it up.

The standard map is with in my case x an angle theta (tz means thetazero) and y the impulsion: x[n+1]=x[n]+ y[n] and p[n+1]=p[n]+K*sin(x[n+1]) where [..] means indice.

 

P.S.: the function you launch is variationcond.m

Link to comment
Share on other sites

No I actually need to plot it, but anyway I stick to this code as I got the presentation tomorow (that's why I've been away for a while). A prof told me that a code in matlab is about 200 times slower than if I wrote it in C++ or else, so maybe that's the reason for taking a long time calculating 150000 points.

 

Anyway, thanks for having looked into it (and I suggest you take just one value of K around 0.75 and then you plot it it is a quite nice figure you obtain-you also have to have a pz in the form of 2*Pi*a with a irrational)-

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...