12. matplotlib-basics
·
Python
We want matplotlib to work inline in the notebook. In [1]: %matplotlib inline In [ ]: import matplotlib.pyplot as plt import numpy as np In [10]: import matplotlib.pyplot as plt import numpy as np from scipy import linalg def markov_chain(n,N): # I use np.array instead of List to utilize the numpy # Construct a random n-vector with non-negative entries and scale its entries so that the sum is 1...