Skip to content

Instantly share code, notes, and snippets.

@MSeifert04
Created June 8, 2017 01:28
Show Gist options
  • Save MSeifert04/cf526882ddb94bf0cb9f428a9a738814 to your computer and use it in GitHub Desktop.
Save MSeifert04/cf526882ddb94bf0cb9f428a9a738814 to your computer and use it in GitHub Desktop.
x = [[1],[1],[1],[-1]]
a = [[-2,-1,-1,-2],[1,-2,2,-1],[-1,-2,-2,-1],[2,-1,1,-2]]
h = 0.1
def K(h,a,x):
cont = [1,2,3,4]
k = [h * item for item in cont]
y = [[item_x[0] + item_k/4] for item_x, item_k in zip(x, k)]
return y
K(h,a,x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment