Claudia Yeboah
Claudia Yeboah

Reputation: 1

phase plane analysis of lorenz equations

Im trying to plot the phase plane analysis of lorenz equations. For example the saddle,spiral,nodes. This is my code

x = np.linspace(-40,40,100)
y = np.linspace(-60,50,100)
z = np.linspace(-100,100,100)
 
rho=28
beta=8/3
sigma=10

xx,yy = np.meshgrid(x,y)
yy,zz = np.meshgrid(y,z)
yy,zz = np.meshgrid(y,z)

uu = sigma*(yy - xx)
vv= rho*xx - yy - xx*zz
ww= xx*yy - beta*zz

fig = plt.figure(figsize=(15,5))

ax1 = fig.add_subplot(131)
ax1.streamplot(xx,yy,uu,vv)
ax1.set_xlabel('$x$')
ax1.set_ylabel('$y$')
ax1.set_title('phaseportrait using streamplot')
plt.show()

fig = plt.figure(figsize=(15,5))
ax3 = fig.add_subplot(133)
ax3.streamplot(yy,zz,uu,ww)
ax3.set_xlabel('$x$')
ax3.set_ylabel('$z$')
ax3.set_title('phaseportrait using streamplot')
plt.show()

fig = plt.figure(figsize=(15,5))
ax2 = fig.add_subplot(132)
ax2.streamplot(yy,zz,vv,ww)
ax2.set_xlabel('$z$')
ax2.set_ylabel('$y$')
ax2.set_title('phaseportrait using streamplot')
plt.show()


I just keep getting errors

I tried quiverplot and streamplot, tried moving the variables around. im expecting a diagram with a saddle node and spiral but its not working

Upvotes: 0

Views: 87

Answers (0)

Related Questions