How do I compute this Poincare Map example (Duffing oscillator): https://en.wikipedia.org/wiki/Duffing_equation#/media/File:Forced_Duffing_equation_Poincar%C3%A9_section.png
This question purpose is to check wether I understand the concept of the Poincaré Map for non-autonomous sytems, because I'll need this for a college project. I start to write the equation as a system of ODE:
\begin{cases} x'=y \\ y'=\gamma cos(\omega t)-\delta y-\alpha x - \beta x^3 \end{cases}
I solve this numerically with ode45 from MATLAB, and I plot every point $(x(\frac{2\pi}{\omega}k), y(\frac{2\pi}{\omega}k))$. I'm using the same parameters used in the example $(\alpha,\beta,\delta,\gamma,\omega)=(1,5,0.02,8,0.5)$ but I'm not obtaining anything similar to the image. I'd like to know what is wrong in here.
You need to do a scatter plot, or a general plot without lines, only with markers. And you need to discard an initial segment where the solution converges towards the attractor.
It appears as if the solution converges somewhat to a limit cycle, so use different initial points to fill the attractor faster.