Created
August 5, 2025 17:43
-
-
Save louismeunier/3a85877f82f2da993c4f39b0d04588c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % henon map plotter | |
| % initial condition | |
| x1=0; | |
| y1=0; | |
| % parameters | |
| a=1.4; | |
| b=0.3; | |
| xs = zeros(10000); | |
| ys = zeros(10000); | |
| xs(1)=x1; | |
| ys(1)=y1; | |
| figure; | |
| hold on; | |
| axis([-2 2 -2 2]); | |
| plot(xs(1), ys(1), '--.', Color='red') | |
| for n=2:10000 | |
| xs(n)=1-a*xs(n-1)^2+ys(n-1); | |
| ys(n)=b*xs(n-1); | |
| plot(xs(n), ys(n), '--.', Color='black') | |
| pause(0.01); | |
| end | |
| hold off; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment