1 | initial version |
You provided the code of R2. So I use R2 to show how to define the n-th power of R2 recursively.
def R2(X):
return matrix(3,1,(-X[0,0],X[1,0],X[2,0]))
def R2_pow(X,n):
if n <= 1:
return R2(X)
else:
return R2(R2_pow(X,n-1))
M = matrix(3,1,(1,1,1))
L = [R2_pow(M,k) for k in [3..10]]
D = {k:R2_pow(M,k) for k in [3..10]}
L; D