Skip to content

Instantly share code, notes, and snippets.

View aquastar's full-sized avatar
🎯
Focusing

Zhiqian Chen aquastar

🎯
Focusing
  • Mississippi State University
  • Starkville
  • 19:43 (UTC -05:00)
  • X @imczq
View GitHub Profile
@aquastar
aquastar / gist:861f0eed23ad77e03050982a26544d38
Created July 23, 2024 23:17
The code simulates the chaotic behavior of the Lorenz system for two slightly different initial conditions, calculates the trajectory differences and Lyapunov exponent over time, plots the results in three subfigures, and saves the output as a PDF file with enlarged font size for better readability. In the results, the first subfigure shows the …
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import solve_ivp
# Set the font size
plt.rcParams.update({'font.size': 16})
# Lorenz system parameters
sigma = 10.0
rho = 28.0