Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python 2nd order ode

def dU_dx(U, x):
    # Here U is a vector such that y=U[0] and z=U[1]. This function should return [y', z']
    return [U[1], -2*U[1] - 2*U[0] + np.cos(2*x)]
U0 = [0, 0]
xs = np.linspace(0, 10, 200)
Us = odeint(dU_dx, U0, xs)
ys = Us[:,0]
Comment

PREVIOUS NEXT
Code Example
Python :: instead of: firstName = "John" lastName = "Henry" city = "Manchester" 
Python :: how to know google index of a page using python 
Python :: consider a string note: "welcome" statment will rais error 
Python :: global variable not accessible withing thread 
Python :: python durchschnitt liste 
Python :: Can Selenium python Web driver helps to extract data from DB 
Python :: hi i smell like poop 
Python :: create new column pandas and order sequence 
Python :: ffmpeg python get total frames 
Python :: How printe word in python 
Python :: Quiver Simple Demo 
Python :: django reverse accessor clashes for abstract class 
Python :: extracts attribute python xml 
Python :: modeltranslation 
Python :: view does not return httpresponse 
Python :: how to add trailing zeros in the number 
Python :: blakyubeuiwbciwcqiby7ib.py 
Python :: sleep python 
Python :: cannot cast type smallint to boolean django 
Python :: python execute echo to file 
Python :: 1051 texes uri solution 
Python :: python groupby 1d array 
Python :: to_csv zip pandas 
Python :: csv file python 
Python :: Collections module: deques and queues 
Python :: python too many values to unpack 
Python :: webcolors python 
Python :: print hi in python 
Python :: run c code in python 
Python :: Reading Excel and other Microsoft Office files 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =