Skip to content

Instantly share code, notes, and snippets.

@MiloSiSyphE
Created December 4, 2017 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MiloSiSyphE/500a2d332142bb76a256284796627568 to your computer and use it in GitHub Desktop.
Save MiloSiSyphE/500a2d332142bb76a256284796627568 to your computer and use it in GitHub Desktop.
import numpy as np
a = np.zeros(shape=(50,50))
for i in range(49):
a[i][i+1] = 1 - 0.02*(i+1)
a[49][0] =1
a = np.asmatrix(a)
I = np.zeros(shape = (50,50))
for i in range(50):
I[i][i] = 1
I = np.asmatrix(I)
E = np.ones(shape = (50,1))
E = np.asmatrix(E)
b = I - a
c = b.getI()*E
c[0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment