Завантаження...

This photo was viewed 4 times and was downloaded in full size 0 times.

This photo was liked 0 times

Source page: http://commons.wikimedia.org/wiki/File:Van_der_pols_equation_phase_portrait.svg

## Summary

 Description English: Phase portrait of Van der Pol oscillator. Created in python using scipy, numpy and matplotlib libraries. ```from numpy import * from scipy import * from scipy.integrate import odeint from matplotlib.pyplot import * from mpl_toolkits.axes_grid.axislines import SubplotZero def myFun(u,t=0.,mu=.5): x = u[0] v = u[1] dx = v dv = mu*(1.-x**2)*v-x return (dx,dv) t = linspace(-5.5,5.5,300) u0 = array([1.,1.]) mu = [.1, .2, .5, 1., 1.5, 2.0] fig = figure(figsize=(5.5,7)) ax = SubplotZero(fig,111) fig.add_subplot(ax) ax.grid(True) for direction in ["right","top"]: ax.axis[direction].set_visible(False) for m in mu: u = odeint(myFun,u0,t,args=(m,)) ax.plot(u[:,0],u[:,1],lw=1.5,label=r'\$\mu=%.1f\$'%m) x = linspace(-3,3,15) y = linspace(-4,4,15) x,y = meshgrid(x,y) X,Y = myFun([x,y]) M = (hypot(X,Y)) M[M==0]=1. X,Y = X/M, Y/M ax.quiver(x,y,X,Y,M,pivot='mid',cmap=cm.jet) ax.minorticks_on() ax.legend(handletextpad=0,loc='upper left') setp(ax.get_legend().get_texts(),fontsize=12) fig.savefig("Van_der_pols_equation_phase_portrait.svg",bbox_inches="tight",\ pad_inches=.15) ``` Date 15 June 2011 Source Own work Author Krishnavedala Other versions

## Licensing

I, the copyright holder of this work, hereby publish it under the following licenses:
 This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. You are free: to share – to copy, distribute and transmit the work to remix – to adapt the work Under the following conditions: attribution – You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). share alike – If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
 Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
You may select the license of your choice.

Licensing:
Creative Commons Attribution-Share Alike 3.0 Unported