Quoted By:
I don't know R but the code will look something like this
import matrix_library ml
import plot library pl
M = [[...],[]...]; # copy the M from the text
v = [...]; # set some init values of dim(M)
vs = [] # initalize the vs's array of vectors you'll dump your data to
for k=0; k<20: vs.append(ml.dot(ml.pow(M, k) , v)) # compute the powers of M and dump the end result
for i=0; i<len(v): pl.plot(vs.transpose()(i)); # transpose to get the data for all times per component (as opposed to the full vectors per time)
This is with computing all the iterations at each step anew, i.e. not super efficient