Created
December 4, 2017 20:06
-
-
Save MiloSiSyphE/500a2d332142bb76a256284796627568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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