sanctus Posted April 27, 2005 Report Posted April 27, 2005 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 Quote
alexander Posted April 28, 2005 Report Posted April 28, 2005 hmm, perhaps you can attatch some code, I'll be glad to take a look at it, probably rewrite it in perl or python and see how it goes... Quote
sanctus Posted April 28, 2005 Author Report Posted April 28, 2005 I actually attached it, but didn't verify if it was on... Actually I can't upload matlab files so I changed in a txt file....but if you haven't got time it isn't of vital importance as I can let run the machines over the week-end. Quote
alexander Posted April 30, 2005 Report Posted April 30, 2005 i see about 150000 loops, dont see why that would take so long, do you have to plot it or can you output your points to a file or something? Quote
sanctus Posted May 2, 2005 Author Report Posted May 2, 2005 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)- Quote
alexander Posted May 4, 2005 Report Posted May 4, 2005 I've been pretty busy with this new project lately it's pretty cool but is still at alpha, need to do more code work, but when it works, i'll be happy to share :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.